Skip to content

Conversation

@MarcoPolo
Copy link
Contributor

Related to #611.

A bit hacky, and there's a couple of footguns with the various RPC copies.

It would be nice to use a context for this, but it doesn't work well because the send is async so we'd have to keep the context around long enough for the send to finish and then clean it up.

Having the rpc check a map behind a lock is one of the cheapest options.

A slight improvement here would be to send the cancelled function separately from the RPC at the expense of more code changes.

Another approach is to change the priority queue to be aware of cancellation, but I think this looks a lot like this approach.

@MarcoPolo
Copy link
Contributor Author

This needs to be careful to not drop piggybacked messages (or at least re-queue them)

@MarcoPolo
Copy link
Contributor Author

Before merging, we should add metrics to this so we can measure how effective this is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant