For a runtime flag, I recently rolled my own solution at https://github.com/JuliaQuantumControl/QuantumControlBase.jl/blob/master/src/conditionalthreads.jl, as discussed in Optional macro invocation - #21 by goerz
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
| Macro to turn on/off parallelisation | 15 | 305 | August 5, 2024 | |
| Putting Threads.@threads or any macro in an if statement | 9 | 1029 | June 15, 2020 | |
| How to turn off @threads for ... while debugging | 1 | 764 | March 15, 2021 | |
| Conditional Multithreading | 12 | 1495 | March 12, 2025 | |
| Condition to use or not to use threaded for loop | 4 | 1005 | March 16, 2022 |