- break</code></pre><p>Set the <code>timeout</code> parameter smaller to let Julia's scheduler cycle more frequently.</p><p>Future versions of JuliaCall may provide tooling to make this simpler.</p><h3 id="py-multi-threading-signal-handling"><a class="docs-heading-anchor" href="#py-multi-threading-signal-handling">Caveat: Signal handling</a><a id="py-multi-threading-signal-handling-1"></a><a class="docs-heading-anchor-permalink" href="#py-multi-threading-signal-handling" title="Permalink"></a></h3><p>We recommend setting <a href="#julia-config"><code>PYTHON_JULIACALL_HANDLE_SIGNALS=yes</code></a> before importing JuliaCall with multiple threads.</p><p>This is because Julia intentionally causes segmentation faults as part of the GC safepoint mechanism. If unhandled, these segfaults will result in termination of the process. See discussion <a href="https://github.com/JuliaPy/PythonCall.jl/issues/219#issuecomment-1605087024">here</a> for more information.</p><p>Note however that this interferes with Python's own signal handling, so for example Ctrl-C will not raise <code>KeyboardInterrupt</code>.</p><p>Future versions of JuliaCall may make this the default behaviour when using multiple threads.</p></article><nav class="docs-footer"><a class="docs-footer-prevpage" href="../pythoncall-reference/">« Reference</a><a class="docs-footer-nextpage" href="../juliacall-reference/">Reference »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.14.1 on <span class="colophon-date" title="Saturday 12 July 2025 20:13">Saturday 12 July 2025</span>. Using Julia version 1.11.6.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
0 commit comments