Skip to content

Inconsistent flat behavior #426

@hobodave

Description

@hobodave

Using concurrent-ruby-edge 0.2.0pre2 on jRuby 9.0.1.0.

The FlatPromise only resolves if the contained future is successful. If the inner future fails, or raises, then the flat never resolves and hangs the program if you wait or call value.

# Works
foo = Concurrent.future { Concurrent.future { 7 } }.flat
foo.value! # 7

# Fails
bar = Concurrent.future { Concurrent.future { raise "no" } }.flat
bar.value! # Hangs

# OR

baz = Concurrent.future { Concurrent.failed_future("no") }.flat
baz.value! # Hangs

Metadata

Metadata

Assignees

Labels

bugA bug in the library or documentation.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions