Merge of the "new ByNeed" branch
Raphael Collet
raph at info.ucl.ac.be
Thu Dec 4 12:00:26 CET 2003
Denys wrote:
> > Maybe it is simpler to synchronize on Y before binding R. The following
> > avoids the creation of a second read-only, without breaking semantics:
> > (...)
>
> I like this better, but I think it has a slight bug when P might
> actually wait until Y becomes needed. Instead, I would make Y needed
> right away:
You're perfectly right. I'll keep your version as a backup if I cannot
complete the optimized version.
> > - {ByNeedFuture P X} could use the same technique as ByNeed above.
> > Simply make X a read-only with a cheap suspension that creates a
> > thread whenever X becomes needed.
>
> If you think about it, my suggestion is a trivial specialization of
> your idea: make a read-only-like variable with one slot (aka your
> suspension) for P. It's a lot easier than your more general scheme
> and we could have it fairly soon. It could be replaced by your more
> general scheme when it becomes available.
I can implement it if someone gives me a hint. I know how to push a
call statement in a thread, but I don't know how to push a try-catch
statement, as ByNeedFuture requires. Can somebody help me?
> > Kevin and I don't think those have to be done for the upcoming
> > release. Maybe for 1.3.1...
>
> Of course, but if we could have them (or at least an optimized
> ByNeedFuture) that would be so much nicer :-)
Okay, I'll examine this closer.
Thanks a lot for your comments, Denys.
Cheers,
raph
-
Please send submissions to hackers at mozart-oz.org
and administriva mail to hackers-request at mozart-oz.org.
The Mozart Oz web site is at http://www.mozart-oz.org/.
More information about the mozart-hackers
mailing list