-
Notifications
You must be signed in to change notification settings - Fork 54
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 AsyncDrain #25
Add AsyncDrain #25
Conversation
buffer = [] | ||
completion {} | ||
} | ||
} |
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.
Newline.
You've got a thumbs up from me. But @paulofaria knows more about this stuff so let's wait for his thumbs up as well. I think we can merge this today since it's been neglected for so long. |
|
||
stream.receive(upTo: 1024, timingOut: deadline) { [unowned self] in | ||
do { | ||
let chunk = try $0() |
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.
I would prefer to use getData
here instead of $0
.
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.
OK. I'll change it.
@paulofaria @tannernelson I fixed some issues. When this is merged and released with next tag then I'm gonna resolve conflicts for open-swift/S4#52. |
This PR is for adding AsyncDrain that has similar apis to
Drain
.And it is required for open-swift/S4#52
Please review this!