Use the D dylib in my C++ program,when the D's GC(in the dylib runtime) run. will not my program stop?
Chris Wright via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Jan 30 08:06:37 PST 2016
On Sat, 30 Jan 2016 14:41:18 +0000, Dsby wrote:
> Use the D dylib in my C++ program,when the D's GC(in the dylib runtime)
> run. will not my program stop?
The GC will stop every thread it knows about. If you have a C++ thread
that you want to run while the GC is running, you can get that by not
telling the D runtime about it. This will limit your ability to interact
with D from that thread somewhat -- and it will interfere more with your
ability to *safely* interact with D even more.
If you never allocate GC memory, of course, the GC will never run.
More information about the Digitalmars-d-learn
mailing list