# Using a shared library generated by PackageCompiler in a multi-threaded program

**URL:** https://discourse.julialang.org/t/using-a-shared-library-generated-by-packagecompiler-in-a-multi-threaded-program/133972
**Category:** General Usage
**Tags:** package-compiler
**Created:** [November 18, 2025, 4:40pm UTC](https://discourse.julialang.org/t/using-a-shared-library-generated-by-packagecompiler-in-a-multi-threaded-program/133972 "2025-11-18T16:40:18Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![GeorgeGkountouras](https://avatars.discourse-cdn.com/v4/letter/g/77aa72/32.png) [@GeorgeGkountouras](https://discourse.julialang.org/u/GeorgeGkountouras)
#### Post date: [November 25, 2025, 3:35pm UTC](https://discourse.julialang.org/t/using-a-shared-library-generated-by-packagecompiler-in-a-multi-threaded-program/133972/6 "2025-11-25T15:35:32Z")

</div>

This is based on personal tests with 1.11/1.12, and conversations with developers of core Julia. I did not try [calling the function 70 times](https://discourse.julialang.org/t/creating-fully-self-contained-and-pre-compiled-library/131374/36), but what used to crash immediately on `jl_init()` no longer does.

PackageCompiler should have (at least) the same limitations as regular Julia, so there isn’t anything to document there. The 1.12 change is part of some wider internal refactoring in the Julia compiler, but I’m afraid I cannot help you there.

---

_[View the full topic](https://discourse.julialang.org/t/using-a-shared-library-generated-by-packagecompiler-in-a-multi-threaded-program/133972)._
