Created
December 16, 2020 02:13
-
-
Save marler8997/3b1f4045aca02b2d99e3d0f7cf1bca3a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn pop(self: *RunQueue) ?*Runnable { | |
const runnable = self.head orelse return null; | |
self.head = runnable.next; | |
if (self.head == null) self.tail = null; | |
return runnable; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment