fixes #13781; fixes #14901; add acyclic pragmas to FlowVar (#20804)

* add acyclic pragmas to FlowVar

* add testcases
This commit is contained in:
ringabout 2022-11-10 16:54:39 +08:00 • committed by GitHub
commit 2848cdb18a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 3 deletions

View file

@ -4,7 +4,7 @@ done999 999
'''
"""
import threadpool
import std/[threadpool, os]
proc foo(): int = 999
@ -17,3 +17,12 @@ proc main =
echo "done", f, " ", b
main()
# bug #13781
proc thread(): string =
os.sleep(1000)
return "ok"
var fv = spawn thread()
sync()
doAssert ^fv == "ok"