mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-29 01:14:41 +00:00
* test azure * use exit 1 * try again * use useSysAssert * disable i386 * use refc for tlsEmulation on i386 * use refc * disable i386 Co-authored-by: Clay Sweetser <Varriount@users.noreply.github.com>
35 lines
552 B
Nim
35 lines
552 B
Nim
discard """
|
|
disabled: i386
|
|
output: '''
|
|
In doStuff()
|
|
In initProcess()
|
|
TEST
|
|
initProcess() done
|
|
Crashes before getting here!
|
|
'''
|
|
joinable: false
|
|
"""
|
|
|
|
import std/os
|
|
import std/typedthreads
|
|
|
|
proc whatever() {.thread, nimcall.} =
|
|
echo("TEST")
|
|
|
|
proc initProcess(): void =
|
|
echo("In initProcess()")
|
|
var thread: Thread[void]
|
|
createThread(thread, whatever)
|
|
joinThread(thread)
|
|
echo("initProcess() done")
|
|
|
|
proc doStuff(): void =
|
|
echo("In doStuff()")
|
|
# ...
|
|
initProcess()
|
|
sleep(500)
|
|
# ...
|
|
echo("Crashes before getting here!")
|
|
|
|
doStuff()
|