bugfix: fixed memory leaks in osproc module

This commit is contained in:
Araq 2011-11-18 22:14:32 +01:00
commit a497b4d1cf
7 changed files with 185 additions and 127 deletions

13
tests/threads/tactors.nim Normal file
View file

@ -0,0 +1,13 @@
discard """
outputsub: "150"
"""
import actors
var
a: TActorPool[int, void]
createActorPool(a)
for i in 0 .. < 300:
a.spawn(i, proc (x: int) {.thread.} = echo x)
a.join()

View file

@ -1,3 +1,6 @@
discard """
output: ""
"""
type
TMsgKind = enum
@ -18,7 +21,7 @@ proc consume() {.thread.} =
x.backTo.send(printedLines)
break
echo x.data
discard atomicInc(printedLines)
atomicInc(printedLines)
proc produce() =
var m: TMsg

View file

@ -1,6 +1,6 @@
discard """
file: "tthreadanalysis2.nim"
line: 45
line: 42
errormsg: "write to foreign heap"
cmd: "nimrod cc --hints:on --threads:on $# $#"
"""