[mercury-users] Exceptions and unique modes

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Feb 16 02:33:22 AEDT 2001


On 15-Feb-2001, Ralph Becket <rbeck at microsoft.com> wrote:
> Another problem is that if the exception is raised while the unique
> attachment is being processed (i.e. the io__state no longer contains
> a valid reference) then we can't expect to recover it when we catch
> the exception.  How does the compiler and/or runtime detect this case?
> 
> If we're prepared to say that any exceptions raised during these points
> are lethal then we can make some progress, but it's far from ideal.

A better alternative, IMHO, is to ensure that no exceptions will be
raised during those points, i.e. ensure that all updates to the
io__state are atomic.  For store__set_mutvar and io__set_globals, this
will come for free on most implementations, I think, since the crucial
steps are just pointer assignments.

Anyway, currently we don't support asynchronous exceptions, so the
issue doesn't arise.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
                                    |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list