Re: Introduction of the TnyLockable

Philip Van Hoof wrote:
> On Mon, 2007-01-22 at 13:02 +0100, Sergio Villar Senin wrote:
>> Philip Van Hoof wrote:
>>> Issuing signals will always have to be done after you g_idle out of the
>>> function. Well it doesn't have to be done that way, but then will your
>>> signal handler run in the thread (and then you would need the gdk
>>> locking, which is probably not what you want).
>>> That's because the function is always launched in a thread.
>> I've been reviewing the code and I think there is a bug, IMO
>> g_thread_join and g_main_loop_unref are called in a wrong order because
>> we should wait first for the thread to finish (it will call
>> g_main_loop_quit) and after that unref it. (See the attached patch in
>> order to better understand what I'm talking about)
> You would have to do this three times (for the forget-pass, the get-pass
> and the alert functions).

Sure, you're right. The patch was just to explain the idea.

> But if it works and you tested it a little bit, you can commit this.

Well I tested it a little bit before sending the patch, and now I'm not
getting some weird freezes that I got before. But as an important change
I'll try to ensure that it works perfectly before committing anything.


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