julia
a502e91e - threads: Keep the `ccall` out of the `@threads` macro expansion (#62987)

Commit
3 days ago
threads: Keep the `ccall` out of the `@threads` macro expansion (#62987) The `:static` nesting check was emitted inline by the macro, so every `@threads` loop placed a `ccall` in its caller. A top-level thunk containing a foreigncall is always sent through codegen, since the interpreter cannot execute one, so a single `@threads for` at top level forced inference and LLVM compilation of the entire enclosing thunk, even under `--compile=min`. Perform the check inside `threading_run` instead; the macro now only emits a call. This prompted by excessive compilation as noticed on a dog-slow RISC-V SBC. Assisted-by: Claude Code (Fable 5.1)
Author
Parents
Loading