Skip to content

Conversation

@dpatti
Copy link
Collaborator

@dpatti dpatti commented Jan 12, 2022

We normally indirectly gain access to the writer in two ways: one is
through the when_ready_to_write callback, and the other through
transfer_to_writer as an argument. Instead, just give the writer to
the body writer directly but continue to drive it from the outside.

This is mostly a simple refactor, but it gives us the ability to do
something smarter in another branch, which is to query the writer to see
if a flush will succeed or not and report back to the user so they can
act appropriately.

We normally indirectly gain access to the writer in two ways: one is
through the `when_ready_to_write` callback, and the other through
`transfer_to_writer` as an argument. Instead, just give the writer to
the body writer directly but continue to drive it from the outside.

This is mostly a simple refactor, but it gives us the ability to do
something smarter in another branch, which is to query the writer to see
if a flush will succeed or not and report back to the user so they can
act appropriately.
@dpatti dpatti requested a review from seliopou January 12, 2022 23:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants