Release status
Raphael Collet
raph at info.ucl.ac.be
Sun Apr 4 22:08:20 CEST 2004
Dear Andreas,
> It seems that all other problems we had could be eliminated by two
> work-arounds:
>
> 1. Explicitly requesting the arguments before calls to '=='.
The implementation of '==' may not request its arguments if they are
equal. Actually '==' requests its arguments only when it blocks on
them. If you expect '==' to always need its arguments, they you must
request them explicitely.
> 2. Avoiding the "fun lazy" construction.
>
> Regarding "fun lazy", I'm not sure what its precise semantics are
> supposed to be now.
I thought I clearly explained this in the past (apparently I didn't).
The "fun lazy" construct no longer uses read-onlys (a.k.a. futures).
The statement
fun lazy {Foo X} blah end
is expanded to
proc {Foo X Y}
thread {WaitNeeded Y} Y=blah end
end
> One of our problems was that under some circumstances it seems to
> generate a "simple" variable, which causes an exception on blocking.
> Since nobody here thoroughly understands what simple vars are and how
> they may appear in a program we would appreciate if somebody could
> enlighten us :-).
Simple variables are free variables. This is an implementation term. A
free variable is represented in the emulator by either an "optimized",
or a "simple" variable. Optimized variables have no suspension list.
The definition of "fun lazy" above implies that, under ALL circumstances
it generates a free (simple) variable... If you want "lazy futures",
you should use !!{ByNeed ...}, or even {ByNeedFuture ...}.
Cheers,
raph
More information about the mozart-hackers
mailing list