From 19cc494b802210936328189a6e3aee3b1e8797a7 Mon Sep 17 00:00:00 2001 From: Tanguy Date: Mon, 21 Nov 2022 20:56:54 +0100 Subject: [PATCH] echo: only lock when threading is enabled (#20890) --- lib/system.nim | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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