flux.future module¶
-
class
flux.future.
Future
(future_handle, prefixes=None, pimpl_t=None)¶ Bases:
flux.wrapper.WrapperPimpl
A wrapper for interfaces that create and consume flux futures
-
class
InnerWrapper
(handle=None, match=_flux._core.ffi.typeof, filter_match=True, prefixes=None, destructor=<bound method ? of <flux.core.inner.Core object>>)¶ Bases:
flux.wrapper.Wrapper
-
check_wrap
(fun, name)¶
-
-
error_string
()¶
-
fulfill_error
(errnum=2, errstr=_flux._core.ffi.NULL)¶
-
get
(*args, **kwargs)¶
-
get_flux
()¶
-
get_reactor
()¶
-
incref
()¶
-
is_ready
()¶
-
raise_if_handle_exception
()¶
-
reset
()¶
-
set_flux
(flux_handle)¶
-
stop
()¶ Stop a future from calling the user callback. Useful for streaming futures given lack of destroy.
-
then
(callback, *args, timeout=- 1.0, **kwargs)¶
-
wait_for
(*args, **kwargs)¶
-
class
-
class
flux.future.
FutureExt
(init_cb, *args, flux_handle=None, **kw_args)¶ Bases:
flux.future.Future
Extensible Future for use directly from Python.
This class allows creation of an "empty" Future which can then be fulfilled with a value or other Future directly from Python.
The purpose is to allow multiple actions, RPCs, etc to be abstracted behind a single interface, with one "Future" object used to signal completion and/or availability of a result to the caller.
-
fulfill
(result=None)¶ Fulfill a future with a result. The
result
can be any object or value that is JSON serializable by json.dumps()
-
get
(*args, **kwargs)¶
-
-
class
flux.future.
WaitAllFuture
(children=None)¶ Bases:
flux.future.Future
Create a composite future which waits for all children to be fulfilled
-
push
(child, name=None)¶
-
-
flux.future.
continuation_callback
(c_future, opaque_handle)¶
-
flux.future.
init_callback
(c_future, opaque_handle)¶