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

I’m using PackageCompiler.jl to build a shared library, so that I can integrate one of my algorithms into a C++ simulation. The C++ simulation is multi-threaded. We’d like to call the Julia algorithm on a thread other than the main thread. When we call into the shared library from anything other than the main thread, though, it hangs.

Does the explanation in the embedding docs apply to PackageCompiler, or does it have additional restrictions? If the embedding docs are appropriate, then it seems that as long as all of my calls to the shared library (including init_julia) happen on the worker thread, it should be fine. But like I said, the simulation hangs.