diff options
author | Araq <rumpf_a@web.de> | 2014-05-12 11:12:37 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2014-05-12 11:12:37 +0200 |
commit | 6195dbe491ccd864c5dcb59f87826291ac1f1ff4 (patch) | |
tree | d2a549857984a296ab4b3e2be72745d413da005a /tests | |
parent | bdb2d21f276c10aee122218384e568ef843690fa (diff) | |
download | Nim-6195dbe491ccd864c5dcb59f87826291ac1f1ff4.tar.gz |
initial non-compiling version of 'parallel'
Diffstat (limited to 'tests')
-rw-r--r-- | tests/system/tsysspawn.nim | 10 | ||||
-rw-r--r-- | tests/system/tsysspawnbadarg.nim | 2 |
2 files changed, 8 insertions, 4 deletions
diff --git a/tests/system/tsysspawn.nim b/tests/system/tsysspawn.nim index 0388918aa..fc7921b0e 100644 --- a/tests/system/tsysspawn.nim +++ b/tests/system/tsysspawn.nim @@ -4,20 +4,22 @@ discard """ cmd: "nimrod $target --threads:on $options $file" """ +import threadpool + var x, y = 0 proc p1 = - for i in 0 .. 1_000_000: + for i in 0 .. 10_000: discard - inc x + atomicInc x proc p2 = - for i in 0 .. 1_000_000: + for i in 0 .. 10_000: discard - inc y, 2 + atomicInc y, 2 for i in 0.. 3: spawn(p1()) diff --git a/tests/system/tsysspawnbadarg.nim b/tests/system/tsysspawnbadarg.nim index ace074602..ce3c5611b 100644 --- a/tests/system/tsysspawnbadarg.nim +++ b/tests/system/tsysspawnbadarg.nim @@ -4,4 +4,6 @@ discard """ cmd: "nimrod $target --threads:on $options $file" """ +import threadpool + spawn(1) |