Ensuring allocation isn't thread-local?

Adam D Ruppe destructionator at gmail.com
Sat Jan 22 19:06:38 UTC 2022


On Saturday, 22 January 2022 at 18:55:30 UTC, Jaime wrote:
> A) Do I need to worry about data being / not being in 
> thread-local storage?

No. Anything allocated with `new` is not thread local... and even 
if it was, you can send the pointer to other threads anyway.

The only things in thread local storage are the direct values in 
the non-shared global variables. What they actually point to is 
just generally on the main heap just like anything else.


More information about the Digitalmars-d-learn mailing list