protected FdbFuture(FdbFutureHandle handle) : base(handle) { _tcs = new TaskCompletionSource <T>(TaskCreationOptions.RunContinuationsAsynchronously); RegisterCallback(SetResult); }
private static extern FdbError fdb_future_block_until_ready(FdbFutureHandle future);
private static extern FdbError fdb_future_get_error(FdbFutureHandle future);
private static extern FdbError fdb_future_set_callback( FdbFutureHandle future, [MarshalAs(UnmanagedType.FunctionPtr)] FdbCallback callbackMethod, IntPtr callbackParameter);
protected FdbFutureBase(FdbFutureHandle handle) { Handle = handle ?? throw new ArgumentNullException(nameof(handle)); _disposed = false; }
public FdbClusterFuture(FdbFutureHandle futureHandle) : base(futureHandle) { }
private static extern FdbError fdb_future_get_cluster(FdbFutureHandle future, out FdbClusterHandle cluster);
public FdbVoidFuture(FdbFutureHandle futureHandle) : base(futureHandle) { }
public FdbDatabaseFuture(FdbFutureHandle futureHandle) : base(futureHandle) { }
private static extern FdbError fdb_future_get_database(FdbFutureHandle future, out FdbDatabaseHandle database);
public FdbValueFuture(FdbFutureHandle futureHandle) : base(futureHandle) { }
private static extern FdbError fdb_future_get_value( FdbFutureHandle future, [MarshalAs(UnmanagedType.Bool)] out bool present, out IntPtr value, out int len);