summary refs log tree commit diff stats
path: root/tests/cpp/tthread_createthread.nim
blob: 2c239005fe798c661d0d52d3e270529216410134 (plain) (blame)
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()