t8535.nim 382 B

12345678910111213141516171819202122232425262728293031
  1. discard """
  2. disabled: i386
  3. output: '''0
  4. hello'''
  5. """
  6. type
  7. CircAlloc*[Size: static[int], T] = tuple
  8. baseArray: array[Size,T]
  9. index: uint16
  10. type
  11. Job = object of RootObj
  12. var foo {.threadvar.}: CircAlloc[1, Job]
  13. when true:
  14. echo foo.index
  15. # bug #10795
  16. import asyncdispatch
  17. import threadpool
  18. proc f1() =
  19. waitFor sleepAsync(20)
  20. echo "hello"
  21. spawn f1()
  22. sync()