summary refs log tree commit diff stats
path: root/lib/system.nim
diff options
context:
space:
mode:
authorTanguy <tanguy@status.im>2022-11-21 20:56:54 +0100
committerGitHub <noreply@github.com>2022-11-21 14:56:54 -0500
commit19cc494b802210936328189a6e3aee3b1e8797a7 (patch)
tree99f8509a9ea2d55bde66c0422cf6bb1644048a08 /lib/system.nim
parentbce1f35f87c0f5930632cb4a2db13d4e40c4f56b (diff)
downloadNim-19cc494b802210936328189a6e3aee3b1e8797a7.tar.gz
echo: only lock when threading is enabled (#20890)
Diffstat (limited to 'lib/system.nim')
-rw-r--r--lib/system.nim3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/system.nim b/lib/system.nim
index d70f572d0..ae07e58f3 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