The background Cranelift pass can race with the first call into a module. In that case ensure_cranelift_compiled() waited by repeatedly polling the module state and burning CPU until the compiler thread finished. Keep the atomic state for the completed fast path, but pair the compiling state with a condition variable. Completion now broadcasts while holding the associated mutex, so waiting callers sleep and cannot miss the transition to finished. |
||
|---|---|---|
| .. | ||
| AbstractMachine | ||
| Parser | ||
| Printer | ||
| Rust | ||
| Tests | ||
| WASI | ||
| CMakeLists.txt | ||
| Constants.h | ||
| CraneliftBridge.cpp | ||
| CraneliftStubs.cpp | ||
| Forward.h | ||
| Opcode.h | ||
| Types.h | ||
| Wasi.h | ||