Skip to content

Instantly share code, notes, and snippets.

@calder
Created October 19, 2014 17:39
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 calder/7713efed7b4d5669e3bd to your computer and use it in GitHub Desktop.
Save calder/7713efed7b4d5669e3bd to your computer and use it in GitHub Desktop.
proc producer(queue: ptr TChannel[int]) =
for i in 0..10:
queue.send(msg=i)
var queue: TChannel[int]
open(queue)
spawn producer(queue)
sync()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment