SignalconnectSignalconnect_SignalemitGets a Gio.Cancellable that will cancel when the promise has been discarded (and therefore result no longer necessary).
This is useful when manually implementing wrappers around various Gio.AsyncReadyCallback based API.
If promise was created with Dex.Promise.new, then null is returned.
a Gio.Cancellable or null
Sets the result for a Dex.Promise.
a GObject.Value containing the resolved value
Resolve promise to value.
Since 0.10resolve_a GObject.GType of G_TYPE_BOXED
the boxed value to store
Resolve promise to value.
Since 1.2resolve_Resolve promise to value.
a GObject.GType of G_TYPE_ENUM
the enum value
Resolves the promise to fd.
The file-descriptor may be dup()'d by this function and
fd closed immediately.
Use dex_await_fd() or similar to retrieve the resolved FD.
a file-descriptor for the resolve to resolve to
Resolve promise to value.
Resolve promise to value.
Resolve promise to value.
Resolve promise to value.
a string to use to resolve the promise
Resolve promise to value.
Resolve promise to value.
Resolve promise to value.
Since 0.8resolve_StaticnewStaticnew_Suspends the current Dex.Fiber and resumes when future has completed.
If future is completed when this function is called, the fiber will handle
the result immediately.
This function may only be called within a Dex.Fiber. To do otherwise will
return false and error set to Dex.Error.NO_FIBER.
It is an error to call this function in a way that would cause intermediate code to become invalid when resuming the stack. For example, if a foreach-style function taking a callback was to suspend from the callback, undefined behavior may occur such as thread-local-storage having changed.
true if the future resolved, otherwise false and error is set.
Awaits on future and returns the GObject.Object-based result.
the object, or null and error is set.
Calls Dex.Future.await and returns the value of
GObject.Value.get_pointer, otherwise error is set if the future
rejected.
a pointer or null
This is a convenience function equivalent to calling Dex.Future.get_status and checking for Dex.FutureStatus.PENDING.
true if the future is still pending; otherwise false
This is a convenience function equivalent to calling Dex.Future.get_status and checking for Dex.FutureStatus.REJECTED.
true if the future was rejected with an error; otherwise false
This is a convenience function equivalent to calling Dex.Future.get_status and checking for Dex.FutureStatus.RESOLVED.
true if the future has successfully resolved with a value; otherwise false
Creates a new list model that will initially be empty and after
future resolves contain the items within it.
a new Dex.FutureListModel
StaticallStaticall_StaticanyStaticcatchStaticcatch_StaticfinallyStaticfinally_StaticfirstStaticnew_Staticnew_Staticnew_Staticnew_Staticnew_Staticnew_Staticnew_Staticnew_Staticnew_Staticnew_Staticnew_Staticnew_Staticnew_Staticnew_Staticnew_Staticnew_Staticnew_Staticnew_StaticthenStaticthen_Staticwith_Staticwith_Staticwith_Staticwith_Releases a reference on the given object, and decreases its reference count by one.
If it was the last reference, the resources associated to the instance are freed.
Dex.Promise is a convenient Dex.Future for propagating a result or rejection in application and library code.
Use this when there is not a more specialized Dex.Future for your needs to propagate a result or rejection to the caller in an asynchronous fashion.