[Bordeaux-threads-devel] [Updated4] Patch for ABCL against BORDEAUX-THREADS HEAD

Martin Simmons martin at lispworks.com
Mon Mar 21 11:43:36 UTC 2011


>>>>> On Fri, 18 Mar 2011 08:50:50 +0100, Mark Evenson said:
> 
> On 3/2/11 8:50 PM, Martin Simmons wrote:
> 
> > I think that the implementation of condition-wait has some major problems:
> 
> Thanks very much for the comments.
> 
> I have an [updated patch][1] that attempts to address these issues for 
> further review for inclusion in BORDEAUX-THREADS.
> 
> [1]: 
> http://detroit.slack.net/~evenson/abcl/bordeaux-threads-abcl-20110318a.diff

That looks good to me.


> > 3) If condition-notify is called by one thread when a waiting thread is just
> > about to enter the threads:synchronized-on form (but before it gets
> > synchronized), then the notify will be lost.  This happens because the
> > underlying threading primitives have no "memory" of calls to notify when
> > nothing it waiting (which is also the expected semantics for POSIX condition
> > variables BTW).
> 
> THREADS:SYNCHRONIZED-ON is now the first form executed by 
> BT:CONDITION-WAIT so the window here is considerably narrowed.

Yes, that fixes it for all correct uses (those that call condition-notify
while holding the lock).

-- 
Martin Simmons
LispWorks Ltd
http://www.lispworks.com/




More information about the bordeaux-threads-devel mailing list