On Wednesday, 27 January 2021 at 17:41:05 UTC, Ali Çehreli wrote:
On 1/26/21 6:31 AM, frame wrote:
> all GCs
Multiple D runtimes? That might work I guess but I've never
heard of anybody talking about having multiple runtimes. Does
rt_init() initialize *a* D runtime or *the* D runtime? If it
indeed works we definitely need much better documentation.
I load my libraries with loadLibrary[1] so that "[if] the
library contains a D runtime it will be integrated with the
current runtime."
Ali
[1]
https://dlang.org/library/core/runtime/runtime.load_library.html
I have no idea if there are multiple runtimes. I just use the
mixin SimpleDllMain. But there must be multiple instances of GCs
running because
1) command line argument --DRT-gcopt=gc:manual was seen by the
EXE but ignored by the DLL and still crashed
2) after "burning in" gc:manual in the DLL, observing
GC.profileStats.numCollections shows in one DLL thread 0 and the
other DLL thread > 0 and thus crashed. Or my debugger lied to me.
I also use loadLibrary.