first steps to explicit channels for thread communication; added mainThreadId

This commit is contained in:
Araq 2011-07-16 18:34:18 +02:00
commit 42e6130b2c
16 changed files with 155 additions and 71 deletions

View file

@ -145,17 +145,17 @@ proc rope*(i: BiggestInt): PRope {.rtl, extern: "nro$1BiggestInt".} =
proc rope*(f: BiggestFloat): PRope {.rtl, extern: "nro$1BiggestFloat".} =
## Converts a float to a rope.
result = rope($f)
proc disableCache*() {.rtl, extern: "nro$1".} =
## the cache is discarded and disabled. The GC will reuse its used memory.
cache = nil
cacheEnabled = false
proc enableCache*() {.rtl, extern: "nro$1".} =
## Enables the caching of leaves. This reduces the memory footprint at
## the cost of runtime efficiency.
cacheEnabled = true
proc disableCache*() {.rtl, extern: "nro$1".} =
## the cache is discarded and disabled. The GC will reuse its used memory.
cache = nil
cacheEnabled = false
proc `&`*(a, b: PRope): PRope {.rtl, extern: "nroConcRopeRope".} =
## the concatenation operator for ropes.
if a == nil: