FLTK logo

Re: [fltk.general] Fl_Preferences instead of boost::interprocess

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.general  ]
 
Previous Message ]New Message | Reply ]Next Message ]

Re: Fl_Preferences instead of boost::interprocess "anmol.... Nov 20, 2021  
  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 ]
 
     
Previous Message ]New Message | Reply ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.