You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 WAMPCANCEL
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 ofClient::call
you wouldn't have therequest_id
until receiving the result.The only thing I can think is that
Client::call
only returns a struct with therequest_id
, and an implementation which would allow you to get theresults
future, or executecancel
from there.The text was updated successfully, but these errors were encountered: