Thanks to everyone who clarified the issue of references to external
variables. If an attempt to unify a value with an external variable
suspends, it's not clear to me why the following program produces an
output before suspending.
local X in
{Browse {SearchAll fun {$} X = x {Browse X} X end}}
end
I get an x in the browser--but no output from SearchAll.
I guess this is not critical, but I would like to understand it. (It
also confused me earlier in this discussion.)
-- Russ
Another interesting observation is that with
local X in
thread {Browse {SearchAll fun {$} X = x {Browse X} X end}} end
X=x
end
you force SearchAll to yield a result. My guess is that the wait that
you observe occurs in Space.merge performed by the search engine. But
let's wait for the official explanation :-)
Cheers,
Filip
P.S. you can achieve the same result by feeding the following line by
line to the emulator (each line runs in its own thread):
declare X
{Browse {SearchAll fun {$} X = x {Browse X} X end}}
X=x
_________________________________________________________________________________
mozart-users mailing list
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users