[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: rev 7004 - branches/svnserve-thread-pools/subversion/svnserve

From: Branko Čibej <brane_at_xbc.nu>
Date: 2003-09-10 04:29:52 CEST

mark benedetto king wrote:

>On Tue, Sep 09, 2003 at 10:33:06PM +0200, Branko ??ibej wrote:
>
>
>>mbk: After a quick glance at your patch, I can say that you're making
>>the same mistakes I did in my patches. :-)
>>
>>
>>
>
>I'm not offended (proud to be in such good company, even), but I am
>wondering what mistakes you saw.
>
>Error handling aside (and some minor optimizations removed), things are
>essentially:
>
>wait(cond, mutex):
> # section 1:
> # wait for pending signals to be delivered
> while 1:
> acquire(cond->mutex)
> if !cond->num_undelivered:
> break
> release(cond->mutex)
>
>
And here's the problem. This is a busy-wait loop that'll drive the CPU
load to 100%, and you most definitely don't want condition variables to
behave that way.

-- 
Brane Čibej   <brane_at_xbc.nu>   http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Sep 10 09:57:19 2003

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.