Future
Object Hierarchy:
Description:
public abstract class Future<
G> :
Object,
Hashable<
Result<
G>>,
Result<
G>
A value which might not yet be available, but will be available at some point.
Futures are thread-safe.
See also:
Promise
Content:
Properties:
Static methods:
- public static Future<G> done<G> (Result<G> result)
Creates a future completed with the given result.
- public static Future<G> err<G> (owned Error exception)
Creates a future completed with the given exception.
- public static Future<G> of<G> (owned G value)
Creates a future completed with the given value.
Creation methods:
Methods:
- public abstract Result<A> transform<A> (owned TransformFunc<A,G> func)
Creates a new future by applying the given function to this future, in
future -- when this future is completed.
- public abstract unowned G wait () throws Error
Waits until the future is completed and gets ths result.
- public abstract bool wait_until (int64 end_time, out unowned G value = null) throws Error
Waits until the future is completed or deadline have passed.
Inherited Members:
All known members inherited from class GLib.Object
All known members inherited from interface Gee.Hashable
All known members inherited from interface Gpseq.Result