summary refs log blame commit diff stats
path: root/tests/cpp/tthread_createthread.nim
blob: b46b876b79e55b360f47b9a5ecf58126dfb6f595 (plain) (tree)
1
2
3
4
5
6
7
8
9
           
                






                                                       
                           



                                      
      
discard """
  targets: "cpp"
  cmd: "nim cpp --hints:on --threads:on $options $file"
"""

proc threadMain(a: int) {.thread.} =
    discard

proc main() =
    var thread: Thread[int]

    thread.createThread(threadMain, 0)
    thread.joinThreads()

main()