diff options
author | Araq <rumpf_a@web.de> | 2011-05-22 21:15:13 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2011-05-22 21:15:13 +0200 |
commit | 9f12727d65aff220b1cd0be6392a687f55cbe5e2 (patch) | |
tree | 9b21043d81fe705e54f9912dfe4c6d034ca0beaa /lib | |
parent | 90ad1182191ed42f5c6cad707a112183b43b713c (diff) | |
download | Nim-9f12727d65aff220b1cd0be6392a687f55cbe5e2.tar.gz |
thread progress
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/core/threads.nim | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/core/threads.nim b/lib/core/threads.nim index eb0c69060..338d9166d 100755 --- a/lib/core/threads.nim +++ b/lib/core/threads.nim @@ -28,7 +28,7 @@ ## ## InitLock(L) ## -## GC_disable() # native GC does not support multiple thready yet :-( +## GC_disable() # native GC does not support multiple threads yet :-( ## for i in 0..high(thr): ## createThread(thr[i], threadFunc, (i*10, i*10+5)) ## for i in 0..high(thr): @@ -53,8 +53,9 @@ include "lib/system/systhread" type TThreadProcClosure {.pure, final.}[TParam] = object fn: proc (p: TParam) - data: TParam threadLocalStorage: pointer + stackBottom: pointer + data: TParam when defined(windows): type @@ -133,7 +134,7 @@ else: const - noDeadlocks = false # compileOption("deadlockPrevention") + noDeadlocks = true # compileOption("deadlockPrevention") type TLock* = TSysLock @@ -341,7 +342,7 @@ when isMainModule: for i in 0..high(thr): joinThread(thr[i]) - #GC_disable() + GC_disable() main() - #GC_enable() + GC_enable() |