[Libsigcx-main] Re: [sigc] Re: [gtkmm] libsigcx and gtkmm 2.4
Status: Beta
Brought to you by:
rottmann
From: Daniel E. <dan...@gm...> - 2004-06-14 16:29:03
|
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. > 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 |