Windows specific: MS C++ versus D thread local variables
Gregor Mückl
gregormueckl at gmx.de
Tue Nov 29 02:50:44 UTC 2022
On Monday, 28 November 2022 at 18:51:37 UTC, NonNull wrote:
> I tested this with D threads and it works for my test program.
> I might guess that this is so in general, because such a
> library has to successfully work with arbitrary MS VC++ and
> that "interop" is defined by MS to work.
I worked on products where native C++ threads were calling
complex CLR code and we never had an issue with the CLR runtime
in these scenarios. As far as I recall the .Net documentation,
this is entirely supported. I believe that the shim code handling
the transitions behind the scenes takes care of that. If you want
to know how it works in detail, I guess you have to dig into the
runtime sources. They are complex and hard to understand, though.
More information about the Digitalmars-d-learn
mailing list