mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-05 20:47:53 +00:00
Add test for fix in f8d6d74368.
This commit is contained in:
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()
|
||||
Reference in New Issue
Block a user