nim-libuv/src/nim_libuv.nim
2020-01-23 13:42:58 -07:00

14 lines
No EOL
254 B
Nim

import nim_libuv/wrapper
proc thread_callback(p: pointer) {.cdecl.} =
echo "hello thread"
proc main() =
var thread: thread_t
let ret = thread_create(thread.addr, thread_callback, nil)
assert ret == 0
discard thread_join(thread.addr)
main()