You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ nim -vNim Compiler Version 2.2.2 [Linux: amd64]Compiled at 2025-02-06Copyright (c) 2006-2025 by Andreas Rumpfgit hash: 6c34f62785263ad412f662f3e4e4bf8d8751d113active boot switches: -d:release
Description
The value of compileOption(“threads”) is always true within NimScript even if passing --threads:off.
This may be due to the fact that NimScript is actually running in multi-threaded mode, but it is a little inconvenient for building a build system.
# config.nims
echo compileOption("threads")
$ nim c --threads:off somewhat
Current Output
true
Expected Output
false
Known Workarounds
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered:
Agreed, but it raises the question if --threads:off is a switch worth keeping. Every switch technically creates a new language dialect and that causes problems for everybody and every tool.
If Nim does not plan to add a new backend in the future, no, I think.
Some potential Nim backends may have unstable multi-threaded support.
No other motive comes to mind for me either.
Context (No need to read):
I noticed this behavior because I was trying to get WebAssembly (wasm) with emscripten as a backend.
I was warned because multi-threading was an experimental feature in emscripten. So I am now trying to switch pipelines depending on the value of threads.
Nim Version
Description
The value of compileOption(“threads”) is always true within NimScript even if passing
--threads:off
.This may be due to the fact that NimScript is actually running in multi-threaded mode, but it is a little inconvenient for building a build system.
$ nim c --threads:off somewhat
Current Output
Expected Output
Known Workarounds
No response
Additional Information
No response
The text was updated successfully, but these errors were encountered: