-
Notifications
You must be signed in to change notification settings - Fork 607
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
Add methods to timeout on pulls #2845
Conversation
F: Temporal[F] | ||
): Pull[F, O2, Unit] = | ||
timed { timedPull => | ||
def go(timedPull: Pull.Timed[F, O]): Pull[F, O2, Unit] = |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both timed { timedPull =>
and go(timedPull
have the same name. I would prefer to avoid name collision here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's intentional to prevent the outer timedPull
from being referenced inside go
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it. We can write it this way as well:
def timeoutWith = {
def go(timedPull: Pull.Timed[F, O]): Pull[F, O2, Unit] = ???
timed(go)
}
@bplommer Could you rebase on top of current |
Co-authored-by: Christopher Davenport <[email protected]>
Co-authored-by: Diego E. Alonso Blas <[email protected]>
@diesalbla I've rebased this on main, sorry for the long delay! |
No description provided.