Re: gthread-win32.c



On Wed, 23 May 2001, Sebastian Wilhelmi wrote:

> Date: Wed, 23 May 2001 14:33:18 +0200
> From: Sebastian Wilhelmi <wilhelmi ira uka de>
> To: Steven Brooks <umbrook0 cs umanitoba ca>
> Cc: gtk-devel-list <gtk-devel-list gnome org>
> Subject: Re: gthread-win32.c
>
> Hi Steven,
>
> > 227 g_mutex_unlock (entered_mutex);
> > 228
> > 229 win32_check_for_error (WAIT_FAILED !=
> > 230 (retval = WaitForSingleObject (event, milliseconds)));
> > 231
> > 232 wilhelmi 1.1 g_mutex_lock (entered_mutex);
>
> > Line 232: the mutex is relocked even if the wait times out.
>
> Yes, it is supposed to do that, I think.

Yes. In fact in POSIX land, the mutex is relocked even if the wait is
canceled, so a cleanup handler must be used to unlock the mutex.





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