diff --git a/lib/system.nim b/lib/system.nim index d70f572d0e..ae07e58f3c 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -2716,7 +2716,8 @@ when notJSnotNims: initSysLock echoLock addSysExitProc(proc() {.noconv.} = deinitSys(echoLock)) - const stdOutLock = not defined(windows) and + const stdOutLock = compileOption("threads") and + not defined(windows) and not defined(android) and not defined(nintendoswitch) and not defined(freertos) and