diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-03-06 10:15:27 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-03-06 10:15:27 +0100 |
commit | 32c9ca605e407bdcb288c66a3ed23625bf2474be (patch) | |
tree | 11db462f115de935bc68ddfae814ddd074fbe7fd /tests | |
parent | e3e4cd9fd5fd72264676b8a1d1297751be85d7cf (diff) | |
download | Nim-32c9ca605e407bdcb288c66a3ed23625bf2474be.tar.gz |
fixes #10795
Diffstat (limited to 'tests')
-rw-r--r-- | tests/threads/t8535.nim | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/tests/threads/t8535.nim b/tests/threads/t8535.nim index e1b5a1369..dfc95547d 100644 --- a/tests/threads/t8535.nim +++ b/tests/threads/t8535.nim @@ -1,16 +1,29 @@ discard """ - output: "0" + output: '''0 +hello''' """ type - CircAlloc* [Size: static[int] , T] = tuple - baseArray : array[Size,T] - index : uint16 + CircAlloc*[Size: static[int], T] = tuple + baseArray: array[Size,T] + index: uint16 type Job = object of RootObj -var foo {.threadvar.}: CircAlloc[1,Job] +var foo {.threadvar.}: CircAlloc[1, Job] when true: echo foo.index + + +# bug #10795 +import asyncdispatch +import threadpool + +proc f1() = + waitFor sleepAsync(100) + echo "hello" + +spawn f1() +sync() |