+ /**
+ * Waits until this [`Future`] completes.
+ */
+ public void wait() {
+ bindings.Future_wait(this.ptr);
+ GC.KeepAlive(this);
+ if (this != null) { this.ptrs_to.AddLast(this); };
+ }
+
+ /**
+ * Waits until this [`Future`] completes or the given amount of time has elapsed.
+ *
+ * Returns true if the [`Future`] completed, false if the time elapsed.
+ */
+ public bool wait_timeout(long max_wait) {
+ bool ret = bindings.Future_wait_timeout(this.ptr, max_wait);
+ GC.KeepAlive(this);
+ GC.KeepAlive(max_wait);
+ if (this != null) { this.ptrs_to.AddLast(this); };
+ return ret;
+ }
+