This commit is contained in:
Andreas Rumpf
2019-03-06 10:15:27 +01:00
parent e3e4cd9fd5
commit 32c9ca605e
2 changed files with 23 additions and 10 deletions

View File

@@ -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()