Rob Browning <[EMAIL PROTECTED]> 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.)


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel

Reply via email to