Merge pull request #2343 from philip-wernersbach/fix-pthreads-under-cpp

Fix issues with pthread_create when compiling under C++ mode.
This commit is contained in:
Andreas Rumpf 2015-03-16 10:27:55 +01:00
commit 327b56d5e1
2 changed files with 16 additions and 2 deletions

View file

@ -0,0 +1,14 @@
discard """
cmd: "nim cpp --hints:on --threads:on $options $file"
"""
proc threadMain(a: int) {.thread.} =
discard
proc main() =
var thread: TThread[int]
thread.createThread(threadMain, 0)
thread.joinThreads()
main()