summary refs log blame commit diff stats
path: root/tests/cpp/tthread_createthread.nim
blob: 0dc081268550e0c618a497f4cc6c21bc09e45639 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
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()