Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workaround for lifetime poisoning with client? #20

Open
NeoVance opened this issue May 25, 2022 · 0 comments
Open

Workaround for lifetime poisoning with client? #20

NeoVance opened this issue May 25, 2022 · 0 comments

Comments

@NeoVance
Copy link

I am looking into implementing call canceling. My first idea to minimize the impact of the changes was to spawn a task for the client to wait for call results, and return a cancelable future from Client::call that would abort the task (if required based on options) and send the WAMP CANCEL message using the Client. This doesn't appear to be possible because of the lifetime poisoning that occurs as described in the commit message from #5.

Anyone have another idea how this could be implemented. The main issue is that you need the call request_id to cancel the call, but in the current implementation of Client::call you wouldn't have the request_id until receiving the result.

The only thing I can think is that Client::call only returns a struct with the request_id, and an implementation which would allow you to get the results future, or execute cancel from there.

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

No branches or pull requests

1 participant