Quick actions

cmd+k|ctrl+k

Navigation

Languages

Untitled

Snippet info

Language

Nim

Visibility

unlisted

Author

legacy-anonymous

Created

2018-06-14T13:11:56Z

Updated

2018-06-14T13:11:56Z

import threadpool

proc echoId(): void {.thread.} =
  while true:
    echo getThreadId()

let thread = spawn echoId()

await thread

#[
  compile with `--threads:on`
  Error: expression 'spawn echoId(),' has no type (or is ambiguous)
]#
INFO