Skip to content

Commit fca4f95

Browse files
Fix error
1 parent f3e9187 commit fca4f95

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/Processors/Formats/Impl/PrettyBlockOutputFormat.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -578,10 +578,8 @@ void PrettyBlockOutputFormat::stopThread()
578578
{
579579
if (thread)
580580
{
581-
{
582-
finish = true;
583-
mono_chunk_condvar.notify_one();
584-
}
581+
finish = true;
582+
mono_chunk_condvar.notify_one();
585583
}
586584
}
587585

@@ -591,7 +589,6 @@ PrettyBlockOutputFormat::~PrettyBlockOutputFormat()
591589
{
592590
stopThread();
593591
thread->join();
594-
thread.reset();
595592
}
596593
}
597594

src/Processors/Formats/Impl/PrettyBlockOutputFormat.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ class PrettyBlockOutputFormat : public IOutputFormat
8080
/// Implements squashing of chunks by time
8181
std::condition_variable mono_chunk_condvar;
8282
std::optional<ThreadFromGlobalPool> thread;
83-
bool finish = false;
83+
std::atomic_bool finish{false};
8484
void writingThread();
8585
void stopThread();
8686
};

0 commit comments

Comments
 (0)