On Sunday, 12 September 2021 at 16:23:13 UTC, frame wrote:
Shouldn't the runtime not already be shared on Linux? The
`Runtime.loadLibrary` specs say
`If the library contains a D runtime it will be integrated with
the current runtime.`
This should be true for the GC too. At least the memory is
shared because as I remember I could access __gshared variables,
whereas on Windows nothing like this works and any DLL will
spawn a new thread (for each thread you use too).
The plugin libraries expose a C API and are dynamically loaded by
the application which is written in C, so presumably using
dlopen. No D runtime there. Still your reply does suggest a way
to proceed...