mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-28 17:04:41 +00:00
* make more standard libraries work with `nimPreviewSlimSystem` * typo * part two * Delete specutils.nim * fixes more tests * more fixes * fixes tests * fixes three more tests * add formatfloat import * fix * last
15 lines
382 B
Nim
15 lines
382 B
Nim
discard """
|
|
matrix: "--threads:on --gc:arc"
|
|
disabled: "freebsd"
|
|
output: "42"
|
|
"""
|
|
import std/assertions
|
|
from std/threadpool import spawn, `^`, sync
|
|
block: # bug #12005
|
|
proc doworkok(i: int) {.thread.} = echo i
|
|
spawn(doworkok(42))
|
|
sync() # this works when returning void!
|
|
|
|
proc doworkbad(i: int): int {.thread.} = i
|
|
doAssert ^spawn(doworkbad(42)) == 42 # bug was here
|