-
Couldn't load subscription status.
- Fork 97
feat: Add flush method on Drain trait
#332
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
Conversation
flush method on Drain traitflush method on Drain trait
|
I think this is an excellent addition! Relying on an explicit I've wanted this for a while. Thank you for adding it :) |
|
Right now, the It's specific to the I think there are two options to make the waiting more explicit. I would appreciate your input on them. 1. Return a
|
|
@Techcable: Thanks for the review. Cool if its usable =). I was not yet sure about the function either. Your suggestion sounds very good. Both options are totally legit and better then what I provided!. The only thing is can we make it such that the signature for an another Maybe the first one makes more sense, however thinking about what you use in generic code is a Furthermore: What I do not quite understand so far ist:
Might that be a solution which makes more sense? |
This is simpler than the API in slog-rs#332 , but requires more work by slog_async to implement it.
This is simpler than the API in slog-rs#332 , but requires more work by slog_async to implement it.
This is simpler than the API in slog-rs#332 , but requires more work by slog_async to implement it.
This is simpler than the API in slog-rs#332 , but requires more work by slog_async to implement it.
This is simpler than the API in slog-rs#332 , but requires more work by slog_async to implement it.
|
Hi @gabyx ! Thank you for your contribution. I have decided to reject this PR in favor of the similar API in #349 . The new |
Closes: slog-rs/async#35
This needs to be thoroughly reviewed, not sure if its good enough =)
io:Result<()>could not be turned intoresult::Result<Self::Ok, Self::Err>since that would need some more redirection or, or I useresult::Result<Self::Ok, Self::Err>and returnOk(Self::Ok::new())if possible in the defaultflush()implementation.Make sure to: