Skip to content

Conversation

@eldoccc
Copy link

@eldoccc eldoccc commented Jul 20, 2023

allows send() and recv() to be cancel safe : they both take mutable references to the struct

in the case of recv() being used inside a tokio::select! for example

It should probably be specified that this isn't as safe as the RequestSender / RequestReceiver way as you could try to send a multipart before receiving data in the case of the receiver and vice versa.

thibaulta added 4 commits July 20, 2023 13:52
… safe in the case of recv() being used inside a tokio::select! for example
… safe in the case of recv() being used inside a tokio::select! for example
… safe in the case of recv() being used inside a tokio::select! for example
@cetra3
Copy link
Owner

cetra3 commented Jul 21, 2023

I think because this is not as safe maybe we should investigate another way to do this. I don't want to introduce a footgun here if there is a cleaner way to do it.

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.

2 participants