Guest User

Untitled

a guest
Nov 22nd, 2013
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.18 KB | None | 0 0
  1. var
  2. thr: array[0..4, TThread[int]]
  3.  
  4. proc threadFunc(a: int) {.thread.} =
  5. echo("hi ", $a)
  6.  
  7. for i in 0..high(thr):
  8. createThread(thr[i], threadFunc, i)
  9. joinThreads(thr)
Advertisement
Add Comment
Please, Sign In to add comment