diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2022-11-10 16:54:39 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-10 16:54:39 +0800 |
commit | 2848cdb18a1bcb0c1eb7ee4ac8807a5471432626 (patch) | |
tree | 874e3587f6f3b843bf12d29dd70a0e2c14c47e39 /lib/pure/concurrency | |
parent | dac5a56d70c25383a378494b38b85d3bbda42558 (diff) | |
download | Nim-2848cdb18a1bcb0c1eb7ee4ac8807a5471432626.tar.gz |
fixes #13781; fixes #14901; add acyclic pragmas to FlowVar (#20804)
* add acyclic pragmas to FlowVar * add testcases
Diffstat (limited to 'lib/pure/concurrency')
-rw-r--r-- | lib/pure/concurrency/threadpool.nim | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/pure/concurrency/threadpool.nim b/lib/pure/concurrency/threadpool.nim index e17fc38b7..9d773dac5 100644 --- a/lib/pure/concurrency/threadpool.nim +++ b/lib/pure/concurrency/threadpool.nim @@ -102,7 +102,7 @@ type idx: int FlowVarBase* = ref FlowVarBaseObj ## Untyped base class for `FlowVar[T] <#FlowVar>`_. - FlowVarBaseObj = object of RootObj + FlowVarBaseObj {.acyclic.} = object of RootObj ready, usesSemaphore, awaited: bool cv: Semaphore # for 'blockUntilAny' support ai: ptr AwaitInfo @@ -111,7 +111,7 @@ type # be RootRef here otherwise the wrong GC keeps track of it! owner: pointer # ptr Worker - FlowVarObj[T] = object of FlowVarBaseObj + FlowVarObj[T] {.acyclic.} = object of FlowVarBaseObj blob: T FlowVar*[T] {.compilerproc.} = ref FlowVarObj[T] ## A data flow variable. |