Skip to content

Instantly share code, notes, and snippets.

@marler8997
Created December 16, 2020 02:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save marler8997/3b1f4045aca02b2d99e3d0f7cf1bca3a to your computer and use it in GitHub Desktop.
Save marler8997/3b1f4045aca02b2d99e3d0f7cf1bca3a to your computer and use it in GitHub Desktop.
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