예제 #1
0
func (f futureNil) Get() error {
	f.BlockUntilReady()
	if err := C.fdb_future_get_error(f.ptr); err != 0 {
		return Error{int(err)}
	}

	return nil
}
예제 #2
0
파일: futures.go 프로젝트: rayleyva/fdb-go
// GetWithError returns an error if the asynchronous operation associated with
// this future did not successfully complete. The current goroutine will be
// blocked until the future is ready.
func (f FutureNil) GetWithError() error {
	fdb_future_block_until_ready(f.ptr)
	if err := C.fdb_future_get_error(f.ptr); err != 0 {
		return Error(err)
	}

	return nil
}