diff options
author | Araq <rumpf_a@web.de> | 2018-08-10 01:20:14 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2018-08-10 01:20:14 +0200 |
commit | 265003df1a6418f37ba21116c46d0a3fbfb1d9cc (patch) | |
tree | 06be95b51a8eec45b9f4b2560ecc7d7e023f6846 /lib/pure/concurrency | |
parent | b4e5c9d075d9c2ef6192749b02738966b3dc943d (diff) | |
download | Nim-265003df1a6418f37ba21116c46d0a3fbfb1d9cc.tar.gz |
deprecated regionized pointers
Diffstat (limited to 'lib/pure/concurrency')
-rw-r--r-- | lib/pure/concurrency/threadpool.nim | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/pure/concurrency/threadpool.nim b/lib/pure/concurrency/threadpool.nim index 6ec71e912..826e42b6c 100644 --- a/lib/pure/concurrency/threadpool.nim +++ b/lib/pure/concurrency/threadpool.nim @@ -89,8 +89,6 @@ proc closeBarrier(b: ptr Barrier) {.compilerProc.} = # ---------------------------------------------------------------------------- type - foreign* = object ## a region that indicates the pointer comes from a - ## foreign thread heap. AwaitInfo = object cv: Semaphore idx: int @@ -231,10 +229,10 @@ proc awaitAndThen*[T](fv: FlowVar[T]; action: proc (x: T) {.closure.}) = action(fv.blob) finished(fv) -proc unsafeRead*[T](fv: FlowVar[ref T]): foreign ptr T = +proc unsafeRead*[T](fv: FlowVar[ref T]): ptr T = ## blocks until the value is available and then returns this value. await(fv) - result = cast[foreign ptr T](fv.data) + result = cast[ptr T](fv.data) proc `^`*[T](fv: FlowVar[ref T]): ref T = ## blocks until the value is available and then returns this value. |