On Sat, Apr 27, 2013 at 8:50 PM, Patrick Walton <[email protected]> wrote:

> Perhaps we could introduce a form which is like "spawn a task to catch an
> exception" from a data sharing view (i.e. it takes an ~fn and can't close
> over any `@` data) but is optimized to just call the closure and trap
> failure instead of actually spawning a whole new task.
>

FWIW this sounds extremely similar to what I was proposing in the other
thread. I formulated it there as a general-case optimization that could
apply whenever you spawn a task and immediately wait for it to finish, but
a special case form would be just as good for the particular use cases
under discussion (mainly try(), are there others?). So if that's something
that could be done (I'm ignorant of the implementation details), it sounds
like great news.

-- 
Your ship was destroyed in a monadic eruption.
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to