通过增加promise_finish函数,实现future的cancel。
This commit is contained in:
@@ -31,6 +31,9 @@ void future_destroy(struct future * f);
|
||||
struct promise * future_to_promise(struct future * f);
|
||||
void promise_failed(struct promise * p, enum e_future_error error, const char * what);
|
||||
void promise_success(struct promise * p, void * result);
|
||||
void promise_finish(struct promise * p);
|
||||
void promise_allow_many_successes(struct promise *p);
|
||||
|
||||
void promise_set_ctx(struct promise * p, void * ctx, promise_ctx_destroy_cb * cb);
|
||||
void * promise_get_ctx(struct promise * p);
|
||||
void * promise_dettach_ctx(struct promise * p);
|
||||
|
||||
Reference in New Issue
Block a user