guile-devel
[Top][All Lists]
Advanced

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

Re: What are the arguments in favor of delay/force in eval.c?


From: Kevin Ryde
Subject: Re: What are the arguments in favor of delay/force in eval.c?
Date: Thu, 08 Dec 2005 11:29:44 +1100
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux)

Rob Browning <address@hidden> writes:
>
> Note that this wouldn't be safe if the initial mutex assignment might
> copy a value that has been half filled by some other thread.

Yep, a single fetch is assumed to be ok in other places too.

An even more radical idea would be not to have a mutex at all.  If two
threads are simultaneously forcing then whichever finishes first sets
the forced value.  (The same way that recursive forcing results in the
first finisher setting the value.)

(Oh, and to bring this slightly back on-topic, I'm imagining that if
streams or lazy stuff throw off quite a few forced promises then it's
a good thing for them to be small and fast.)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]