Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Resolve undefined IO throwing behavior in the presence of async and non-termination #110

Open
Assignees

Description

Suppose we have the following IO tree:

IO<Object> throwImmediately = IO.throwing(new IllegalStateException("head fell off"));
IO<Unit> parkForever = io((SideEffect) LockSupport::park);
throwImmediately.discardL(parkForever).unsafePerformAsyncIO().join();

What should the result be? Should it throw, or block?

Intuitively, it feels like it should probably throw immediately, and why wouldn't it? Well, because there is asynchrony, and since discardL is just a sugary zip call, and since zip can only execute once both results have been computed, the backing future holding the thrown exception will never be interrogated, so the exception will never propagate.

Investigate whether or not a principled approach to parallel IO can also easily immediately propagate exceptions under the context of asynchrony without violating correctness.

Metadata

Metadata

Assignees

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      AltStyle によって変換されたページ (->オリジナル) /