Re: About WIN32 threads and awin32

From: Guido Serassio <serassio@dont-contact.us>
Date: Sun, 05 Jan 2003 20:36:15 +0100

Hi Henrik,

Il 15.06 04/01/2003 Henrik Nordstrom ha scritto:
>Guido Serassio wrote:
>
> > I have followed the last discussion on aufs threads, so I have a doubt. The
> > following is the final code of awin32 squidaio_thread_loop:
> >
> > done_queue.tailp = &request->next;
> > if (!ReleaseMutex(done_queue.mutex)) {
> > CloseHandle(cond);
> > return 1;
> > }
> > Sleep(0);
> > threadp->requests++;
>
>Hmm.. what is this exacly doing? (the first part).
>
> > Do you think that using Sleep(0) give the same result of the new aufs
> > "signal" pipe ?
>
>Not quite.
>
>The signal pipe is about having poll/select terminate their timeout
>quickly when the I/O threads signal that an I/O event have completed.

Ok, now I have understand better the question.

>Assuming the fragment above is from the I/O threads I see no function of
>the Sleep(0). If there is more requests in the requests queue the I/O
>thread should continue executing as far as it gets.

Yes, I was thinking on the context switch side, but the problem can be on
the requests queue side.

Thanks

Regards

Guido

-
=======================================================
Serassio Guido
Via Albenga, 11/4 10134 - Torino - ITALY
E-mail: guido.serassio@serassio.it
WWW: http://www.serassio.it
Received on Sun Jan 05 2003 - 12:36:32 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:19:05 MST