diff options
Diffstat (limited to 'tests/threads/t8535.nim')
-rw-r--r-- | tests/threads/t8535.nim | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/tests/threads/t8535.nim b/tests/threads/t8535.nim new file mode 100644 index 000000000..a4296df11 --- /dev/null +++ b/tests/threads/t8535.nim @@ -0,0 +1,30 @@ +discard """ + disabled: i386 + output: '''0 +hello''' +""" + +type + CircAlloc*[Size: static[int], T] = tuple + baseArray: array[Size,T] + index: uint16 + +type + Job = object of RootObj + +var foo {.threadvar.}: CircAlloc[1, Job] + +when true: + echo foo.index + + +# bug #10795 +import asyncdispatch +import threadpool + +proc f1() = + waitFor sleepAsync(20) + echo "hello" + +spawn f1() +sync() |