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()
span>= var b: bool b = not false return nil var global: int var s: string i: int r: TA r.b.a.x = 0 global = global + 1 exportme() write(stdout, "Hallo wie hei�t du? ") write(stdout, getPA().x) s = readLine(stdin) i = 0 while i < s.len: if s[i] == 'c': write(stdout, "'c' in deinem Namen gefunden\n") i = i + 1 write(stdout, "Du hei�t " & s)