Dave Whipp wrote:

Under my junctive semantics it is. It simply calls C<open> twice, with
the two states, and returns a conjunction of the resulting filehandles.
Though you probably really want a *dis*junction there.

The thing that's worrying me is: what happens when one of them throws an
exception?
Then the exception propagates back to the calling context and the result
junction is never created.


> Can I catch half of the junction?

You mean: can you catch the exception generated by half a junction. Yes.


Do the two threads ever join?
Yes. At the point of recombining the values of the parallel calls.


Does the exception get deferred until after all the threads have completed?
I would doubt it.


If both throw an exception: what happens then?
You just get one or the other, in no defined order.
(No, I'm *not* going to scare Dan by suggesting that $! ends up with
a junction of the two exceptions. ;-)

Damian

Reply via email to