3 ms·
So you can embed it in the same way you can embed e.g. python or octave. This is fine for some uses, but it is a bit invasive. How does it interact with multipl
by cozzyd 3y ago
So you can embed it in the same way you can embed e.g. python or octave. This is fine for some uses, but it is a bit invasive. How does it interact with multiple threads? That's a huge pain point in embedding python code...
edit: just found https://docs.julialang.org/en/v1/manual/embedding/#Thread-safety https://docs.julialang.org/en/v1/manual/embedding/#Thread-sa...
Ok, so, it's tricky, but at least you can start an interpreter per thread...
- adgjlsfhk1 3y agoYou can also run multi-threaded Julia from external threads. Julia unlike python doesn't have a GIL (or similar), and supports native multi-threading. As of 1.10 (I think, it might be 1.9), you can also add threads after startup (which is necessary for interfacing with spark or similar systems).
- eigenspace 3y agoYep that's right. Again though, PackageCompiler.jl does work quite well for creating .so / .dylib / etc shared libraries from julia code for more traditional library-style interaction, and is quite mature and widely used. It produces quite big binaries, but the more involved and complicated your application is, the less that matters.