-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: Rename WithChannels
, tx
and rx
#32
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
base: Frando/spsc-is-mpsc
Are you sure you want to change the base?
Conversation
if the future gets dropped before completion or if it returns an io error.
Make sure sending fails after the first io error or future drop
e915b84
to
bbc2f6a
Compare
Hm, the whole thing is the request, the inner thing is the message. But then I call the messages XXXRequest usually, e.g. GetRequest, PutRequest. Still, this part doesn't seem so controversial. About rx/tx vs update/reply. It's longer and deviates from the async rust convention of tx/rx. Is it really that important that this is intiuitive vs short, given that it is intentionally pretty low level to match what you would do by hand? I guess @b5 should comment. You are the target audience for this lib. If you find it much better I guess we should do it. |
I'm a big fan of The struct being called To me any |
I think I agree to what @b5 said, but also to the niceness of short names for these oftenly-destructured structs that @rklaehn brings up. Let's go back to the bikeshed board: // status quo
let WithChannels { inner, tx, rx, span } = msg;
// frando's first suggestion
let Request { message, reply, updates, span } = request;
// b5's first suggestion
let WithChannels { request, response, updates, span } = msg; I'm unsure myself. So here's some more variations let Incoming { request, tx, rx, span } = msg;
let ReqCtx { message, tx, rx, span } = ctx;
let Rpc { msg, res, req, span } = rpc; |
6eea8ed
to
0c4fe47
Compare
We have some reports that the
WithChannels { tx, rx, inner }
terminology is not very intuitive for people.This very-much-breaking PR proposes the following renames:
WithChannels { inner, tx, rx, span }
becomesRequest { message, reply, updates, span }
Request
is renamed toRequestSender
(to be able to useRequest
for what was so farWithChannels
)tx
->reply
,rx
->updates
Let's discuss! We only wanna do this once.
cc @b5