[Libsigcx-main] Re: [sigc] Re: [gtkmm] libsigcx and gtkmm 2.4
Status: Beta
Brought to you by:
rottmann
From: Martin S. <mar...@hi...> - 2004-06-14 17:48:54
|
Am 14.06.2004 01:18:56 schrieb(en) Daniel Elstner: > Am So, den 13.06.2004 um 23:47 Uhr +0200 schrieb Christer Palm: > > > 1. An string object is created. > > 2. The shared mutex is locked. > > 3. A shared copy of the string object is made. > > 4. The mutex is unlocked. > > 5. The original string object is destroyed. > > > > Now, the problem I see here is that the original string is > destroyed > > > after the mutex is unlocked. So if string isn't thread-safe this is > a > > problem. > > That's indeed another problem. Hm... after reading: http://gcc.gnu.org/onlinedocs/libstdc++/faq/#5_6 I still cannot answer the question whether string (in the example from above) _is_ thread-safe?! Regards, Martin > > But if fail to see how locking the mutex before creating the > original > > string would make any difference. Successfully locking or unlocking > a > > mutex is guaranteed to synchronize memory with respect to other > threads > > regardless of whether that memory was touched before or after the > mutex > > was locked. > > That's new to me. Do you have any reference on that? > > --Daniel > > > _______________________________________________ > gtkmm-list mailing list > gtk...@gn... > http://mail.gnome.org/mailman/listinfo/gtkmm-list > |