linkedin / parseq

Asynchronous Java made easier
Apache License 2.0
1.17k stars 266 forks source link

Fix cancel() implementation in ListanbleFutureUtil #327

Closed junchuanwang closed 1 year ago

junchuanwang commented 1 year ago

Previous implementation has two problems that fixed in this PR.

  1. We now use best effort to cancel GRPC future and that shouldn't impact the return value of cancelled() that supposed to indicate base Task cancellation
  2. We should only cancel GRPC future when base task state transition confirmed to happen.