-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Open
Labels
DocumentationRelated to documentation content (not generation).Related to documentation content (not generation).Threads
Description
Description
Hello,
Apparently, it is not possible to create a thread var and return it from a proc. It causes a SIGSEV
import os
proc threadMain() {.thread.} =
sleep(100000)
proc main(): Thread[void] =
var th: Thread[void]
createThread(th, threadMain)
return th
var th = main()
joinThread(th)
Nim Version
nim v2.0.4 on Fedora
Current Output
No stack traceback available
SIGSEGV: Illegal storage access. (Attempt to read from nil?)
Expected Output
No response
Possible Solution
No response
Additional Information
No response
Metadata
Metadata
Assignees
Labels
DocumentationRelated to documentation content (not generation).Related to documentation content (not generation).Threads