Skip to content

Commit 90f2178

Browse files
committed
fix(effects): prevent deadlock in flushing stderr
If tracing is installed, the `warn!` call will attempt to write to `ErrorStream`, which seems to cause a deadlock when we are destroying the `ErrorStream`.
1 parent c4d5536 commit 90f2178

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

git-branchless-lib/src/core/effects.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -829,13 +829,6 @@ trait WriteProgress {
829829
fn drop(&mut self) {
830830
let buffer = self.get_buffer();
831831
if !buffer.is_empty() {
832-
// In practice, we're expecting that every sequence of `write` calls
833-
// will shortly end with a `write` call that ends with a newline, in
834-
// such a way that only full lines are written to the output stream.
835-
// This assumption might be wrong, in which case we should revisit
836-
// this warning and the behavior on `Drop`.
837-
warn!(?buffer, "WriteProgress dropped while buffer was not empty");
838-
839832
// NB: this only flushes completely-written lines, which is not
840833
// correct. We should flush the entire buffer contents, and possibly
841834
// force a newline at the end in the case of a progress meter being

0 commit comments

Comments
 (0)