Re: [m-users.] What is "thread-local storage"?
Julien Fischer <[email protected]> Fri, 15 Dec 2023 23:57:09 +1100 (AEDT)
| Newsgroups | gmane.comp.lang.mercury.general |
|---|---|
| Message-ID | <[email protected]> |
On Fri, 15 Dec 2023, Volker Wysk wrote: > In mercury_memory.h, there's this: > > // MR_GC_NEW(type): > // Allocates space for an object of the specified type. > // If conservative GC is enabled, the object will be garbage collected > // when it is no longer referenced from GC-traced memory. > // Memory allocated with malloc() (or MR_malloc() or MR_NEW()) > // is not GC-traced. Nor is thread-local storage. > > I don't understand the "Nor is thread-local storage." part. What is > "thread-local storage"? In this context it can refer to values stored using the POSIX threads function pthread_setspecific(), or to variables declared using GCC's __thread keyword or C11's _Thread_local keyword. > Do I need to care? I can't answer that; I don't know what you are trying to do. Julien. _______________________________________________ users mailing list [email protected] https://lists.mercurylang.org/listinfo/users