Created
January 13, 2020 15:43
-
-
Save treeform/56ca19868d8756b714769eca6d8fcc34 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| type FooThread = ref object | |
| thread: Thread[void] | |
| var fooThreads: seq[FooThread] | |
| for i in 0 ..< 5: | |
| var t = FooThread() | |
| createThread(t.thread, threadFunc) | |
| fooThreads.add t | |
| for t in fooThreads: | |
| joinThread(t.thread) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment