-
Notifications
You must be signed in to change notification settings - Fork 163
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
Move from .wait() to .ready #243
Comments
"ready" sounds "it's ready to read data when fulfilled" to me, but it's not. I don't have a great idea, but I think .wait() is better than .ready. |
The main thing is it needs to be a property not a method. I think ready works OK? Except for when it transitions from waiting to closed, I guess it is a bit misleading. Other ideas welcome though. |
Let me add some more details about what I and @yutakahirano chatted. Even when ( It's true that there transition to
So, we also questioned if we really should reject |
I think you are very right that it should be fulfill-only. "ready" seems like an OK name still in the sense of "no longer waiting" but I'll think about it more. Maybe there is a better adjective. |
Both @yutakahirano wdyt? |
"wait" method sounds good. The caller will get the notification of a state transition from waiting. |
I implemented the rename in a commit that was largely search-and-replace. The issue of making .ready fulfill-only is a bit trickier so I will open a new issue to continue discussion. |
Part of #245; see discussions in #243 (comment). Consumers should always either check the state property, or count on the fact that read() will throw when used on an errored stream.
Part of #245; see discussions in #243 (comment). Consumers should always either check the state property, or count on the fact that read() will throw when used on an errored stream.
Part of #245; see discussions in #243 (comment). Consumers should always either check the state property, or count on the fact that read() will throw when used on an errored stream.
After the work in #234 lands wait() will no longer be side-effecting. So it should become a property, not function.
.ready
is a good name.The text was updated successfully, but these errors were encountered: