summary refs log tree commit diff stats
path: root/tests/cpp/tthread_createthread.nim
blob: 363136e9da79895ba65808c2edfa1c7a778b66d4 (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: Thread[int]

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

main()