Skip to content
This repository has been archived by the owner on Nov 15, 2023. It is now read-only.

Substrate-BFT task cancelling #605

Closed
rphmeier opened this issue Aug 25, 2018 · 0 comments
Closed

Substrate-BFT task cancelling #605

rphmeier opened this issue Aug 25, 2018 · 0 comments
Assignees

Comments

@rphmeier
Copy link
Contributor

Dropping AgreementHandle waits for a Task to be sent over a channel, which happens when the BftFuture is first polled or on drop. However, this can race against the local thread's event loop being turned.

The simple fix is to alter AgreementHandle to store a oneshot::Sender<()> and BftFuture to store the receiver, and cancel itself upon hearing something on that channel.

@rphmeier rphmeier self-assigned this Aug 28, 2018
liuchengxu pushed a commit to chainx-org/substrate that referenced this issue Aug 23, 2021
* do not return directlty, use zero represent it

* add assert for check
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant