Re: [gtk-list] Re: GLIB+win32 memory problem



Tim Janik wrote:

> i also doubt that this is a reasonable approach at things, if you need thread
> locking, why don't you use one global mutex? as soon as you want to lock

> single objects, code complexity doubles (or does that actually grow
> exponentially? ;) because to update one GList node, you'd had to take care
> of locking the ->prev and ->next nodes as well, and that gets you into the
> matter of locking single objects in the right order to avoid deadlock
> scenarios.
> imho, you're better off defining+implementing your own structures/objects
> once you want per node locking.
>

you're right of course--poor design on my part.  i don't need node-level locking,
it just surfaced as an artifact of my design for a clean (read as:  pleasing to
the eye and tendonitis)  list-global lock.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]