summary refs log tree commit diff stats
path: root/tests/threads/t8535.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/threads/t8535.nim')
-rw-r--r--tests/threads/t8535.nim30
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()
tle='author Kartik K. Agaram <vc@akkartik.com> 2017-11-05 01:47:03 -0800 committer Kartik K. Agaram <vc@akkartik.com> 2017-11-05 01:47:03 -0800 4107' href='/akkartik/mu/commit/continuation4.mu?h=main&id=4c5136859dce2bc752e60b450f64c62ee7e66815'>4c513685 ^
4a48bedc ^
4c513685 ^
01ce563d ^
58d918de ^
4c513685 ^

5059f32d ^
4c513685 ^

58d918de ^


5059f32d ^
dd660682 ^
4c513685 ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47