Re: A few remarks about locking
- From: Emmanuel <e allaud wanadoo fr>
- To: balsa-list gnome org
- Subject: Re: A few remarks about locking
- Date: Tue, 26 Mar 2002 19:35:25 +0100
On 26.03.2002 23:40 Pawel Salek wrote:
> On 2002.03.26 23:27 Carlos Morgado wrote:
>> On Tue, Mar 26, 2002 at 09:35:33PM +0100, Pawel Salek wrote:
>> >
>> > One must be *extremely* careful. nested locks must always acquired
>> in
>> > same order (see HACKING). Otherwise, it easy to deadlock. Possible
>> > scenario: mailbox lock is held by a thread, gdk lock is released.
>> The
>> > other thread gets GDK lock and waits for mailbox lock. The first
>> thread
>> > tries to get GDK lock back, and we have a deadlock.
>> >
>>
>> in this particular:
>>
>> [...] neat scheme
>>
>> doesn't seem particularly evil
>
> I guess that would do.
>
I think it's OK, and in practice it works for me (I even get a slightly
more responsive UI when opening/checking large mailboxes). I think we
should carefully take a look at the open/check code and try to lock gdk
only when needed to avoid the big waits we have now (I know it my balsa-ml
mailbox is about 4000 messages ;-)
Bye
Manu
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]