Add test for fix in f8d6d74368.
This commit is contained in:
parent
f8d6d74368
commit
dcf4cee37c
1 changed files with 14 additions and 0 deletions
14
tests/cpp/tthread_createthread.nim
Normal file
14
tests/cpp/tthread_createthread.nim
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
discard """
|
||||||
|
cmd: "nim cpp --hints:on --threads:on $options $file"
|
||||||
|
"""
|
||||||
|
|
||||||
|
proc threadMain(a: int) {.thread.} =
|
||||||
|
discard
|
||||||
|
|
||||||
|
proc main() =
|
||||||
|
var thread: TThread[int]
|
||||||
|
|
||||||
|
thread.createThread(threadMain, 0)
|
||||||
|
thread.joinThreads()
|
||||||
|
|
||||||
|
main()
|
||||||
Loading…
Add table
Add a link
Reference in a new issue