module Concurrent::Promises::FactoryMethods
def make_future(argument = nil, default_executor = self.default_executor)
-
(Future)
- a fulfilled future with the value. -
(Future)
- a rejected future with the exception as its reason. -
(Event)
- an event which will be resolved when an_event is. -
(Future)
- a future which will be resolved when a_future is. -
(Event)
- resolved event. -
(Event, Future)
-
Parameters:
-
value
(Object
) -- when none of the above overloads fits -
exception
(Exception
) -- -
an_event
(Event
) -- -
a_future
(Future
) -- -
nil
(nil
) --
Overloads:
-
make_future(value, default_executor = self.default_executor)
-
make_future(exception, default_executor = self.default_executor)
-
make_future(an_event, default_executor = self.default_executor)
-
make_future(a_future, default_executor = self.default_executor)
-
make_future(nil, default_executor = self.default_executor)
Other tags:
- See: rejected_future, - resolved_event, fulfilled_future
def make_future(argument = nil, default_executor = self.default_executor) case argument when AbstractEventFuture # returning wrapper would change nothing argument when Exception rejected_future argument, default_executor when nil resolved_event default_executor else fulfilled_future argument, default_executor end end