mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
20 lines
269 B
Nim
20 lines
269 B
Nim
discard """
|
|
output: '''
|
|
done999 999
|
|
'''
|
|
"""
|
|
|
|
import threadpool
|
|
|
|
proc foo(): int = 999
|
|
|
|
# test that the disjoint checker deals with 'a = spawn f(); g = spawn f()':
|
|
|
|
proc main =
|
|
parallel:
|
|
let f = spawn foo()
|
|
let b = spawn foo()
|
|
echo "done", f, " ", b
|
|
|
|
main()
|