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