Re: [sigc] Re: [gtkmm] libsigcx and gtkmm 2.4
- From: Christer Palm <palm nogui se>
- To: Daniel Elstner <daniel elstner gmx net>
- Cc: libsigcx-main lists sourceforge net, libsigc-list gnome org, Gtkmm List <gtkmm-list gnome org>
- Subject: Re: [sigc] Re: [gtkmm] libsigcx and gtkmm 2.4
- Date: Sun, 13 Jun 2004 21:34:48 +0200
Daniel Elstner wrote:
The problem is you need to lock before the data is being written. And
mutexes don't ensure that event A happens after event B. Mutexes ensure
that read/write A and read/write B don't happen at the same time, _and_
they issue memory barrier instructions to ensure memory visibility.
Hmm. Perhaps it would be better if you took a look at the code and told
me where the problem is?
Remember, we're talking about thread synchronization. This is not
something to be taken lightly. Also note that nobody said that the
locked data has to be global; you can easily store it in an object
somewhere appropriate, or even put it into a queue.
I'm not taking it lightly. My point was that although you could
technically accomplish the same thing without arguments, arguments is a
pretty useful feature.
If you have similar code in perhaps hundreds of places doing similar
things, then it would make sense to attempt to make a generic
implementation of that pattern. Which is exactly what this is about.
--
Christer Palm
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]