new branch mozart-1-3-0-pthread
Peter Van Roy
pvr at info.ucl.ac.be
Thu Sep 6 11:09:23 CEST 2001
> > There are some issues of asynchronous exception handling that show up
> > here. E.g., the synchronous fast step should return a variable that gets
> > bound to 'normal' upon normal completion of the asynchronous slow step,
> > or the exception, if the asynchronous slow step raises an exception.
>
> What asynchronous exceptions? If you are thinking "Oz exceptions",
> forget it! the asynchronous step cannot even _look_ at Oz data
> structures, much less invoke anything in the Oz runtime, and we don't
> want a mutex safe-guarding every Oz heap access now, do we? :-) Even
> the possibility of merely holding on to an Oz value brings some
> complexity since it needs to be seen by any potential concurrent
> garbage collection (concurrent from the point of view of system
> threads other than the main "emulator" one).
I wasn't thinking about Oz exceptions, but about what to do when the
asynchronous slow step has a problem, i.e., it cannot complete normally.
The Oz program must be informed of this cleanly and quickly. The slow
step must be able to tell the Oz program when and if it completes
normally. One way is for the slow step to hold on to an unbound Oz
variable, either directly or indirectly (e.g., through a flag that is
checked by the emulator).
In any case, the slow step has *some* influence on the Oz program since
it is doing something, e.g., opening a connection, that will influence
Oz execution later on!
Peter
-
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