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 agree with both proposals.
For the first proposal, we will have to implement sel.read_case(ch, x) and sel.write_case(ch, x) methods as a part of select.
For the second proposal, we can have more consistency and can reuse concepts from channel implementation. Since in the PR: #8164 , the proposal is to make send and recv as functions of fluid instead of channel. So one proposal is:
sel = fluid.select()
with sel.case(fluid.recv(ch), x):
do_something_with(x)
sel = fluid.select()
with sel.read_case(ch, x):
do_something_with(x)
@helinwang , I like your suggestion too. I am just a little skeptic that since we will have to implement it for both the cases, i.e. the standalone channel and select, we might run into complications. I think we can start off with Yi's first suggestion and then later see if we can support your design. What do you think?
It looks to me that
is a little more readable than
What do you think?
The text was updated successfully, but these errors were encountered: