|
|
I used to think so. But in a specific case - global's in static libs are duplicated in a process address space if you link them into multiple DLL. The suggested solution of using fltk as a DLL is the best option. I ended up using a static mutex. Also, in case someone views this thread, if you only wish to be notified of an event, saving a std::atomic using void* works well. On Wednesday, November 17, 2021 at 8:45:38 PM UTC+5:30 Matthias Melcher wrote:
Um (hi Ian, Bill ;-) , a few things:
1. threads have thread-local memory, but can still access the global space of the main thread. So if your main thread creates a Mutex, all children cann access that thread. Just pass a pointer to the Mutex in the appropriate call.
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/3352f065-a48f-47b7-9d96-63ee41317cf9n%40googlegroups.com.
[ Direct Link to Message ] | |
|
| |