mangos icon indicating copy to clipboard operation
mangos copied to clipboard

Want context.Context versions of send, receive

Open gdamore opened this issue 4 years ago • 0 comments

We code that uses timeout options, but these APIs were designed back before context.Context existed.

It would be good to introduce APIs like

RecvContext() and RecvMsgContext() that took a context as their first argument. Arguably, the former receive functions could then be implemented in terms of these. We would then deprecate the legacy options.

This would also potentially provide a nice API for cancellation.

gdamore avatar Sep 27 '20 23:09 gdamore