diff options
author | Araq <rumpf_a@web.de> | 2019-08-16 13:29:58 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2019-08-16 13:29:58 +0200 |
commit | bebda3851f0f9d3433c4df773bd6984a009a045f (patch) | |
tree | 6e89f1884f04f5ae3f8a0badf627de44362f3226 /lib/pure/concurrency | |
parent | c7e77edecc85b5e228e9b5dfb2ba3bf3a0be3b41 (diff) | |
download | Nim-bebda3851f0f9d3433c4df773bd6984a009a045f.tar.gz |
fixes #1188
Diffstat (limited to 'lib/pure/concurrency')
-rw-r--r-- | lib/pure/concurrency/threadpool.nim | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/pure/concurrency/threadpool.nim b/lib/pure/concurrency/threadpool.nim index e5ac09cf6..3ade6b4f2 100644 --- a/lib/pure/concurrency/threadpool.nim +++ b/lib/pure/concurrency/threadpool.nim @@ -251,7 +251,10 @@ proc `^`*[T](fv: FlowVar[ref T]): ref T = ## Blocks until the value is available and then returns this value. blockUntil(fv) let src = cast[ref T](fv.data) - deepCopy result, src + when defined(nimV2): + result = src + else: + deepCopy result, src finished(fv) proc `^`*[T](fv: FlowVar[T]): T = @@ -259,7 +262,10 @@ proc `^`*[T](fv: FlowVar[T]): T = blockUntil(fv) when T is string or T is seq: let src = cast[T](fv.data) - deepCopy result, src + when defined(nimV2): + result = src + else: + deepCopy result, src else: result = fv.blob finished(fv) |