mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-30 11:32:03 +00:00
move to poco::event
This commit is contained in:
parent
f3ee129074
commit
761b369fa2
@ -110,7 +110,7 @@ void ParallelParsingInputFormat::parserThreadFunction(ThreadGroupStatusPtr threa
|
|||||||
{
|
{
|
||||||
column_mapping = input_format->getColumnMapping();
|
column_mapping = input_format->getColumnMapping();
|
||||||
column_mapping->is_set = true;
|
column_mapping->is_set = true;
|
||||||
first_parser_finished.Notify();
|
first_parser_finished.set();
|
||||||
}
|
}
|
||||||
|
|
||||||
// We suppose we will get at least some blocks for a non-empty buffer,
|
// We suppose we will get at least some blocks for a non-empty buffer,
|
||||||
@ -123,7 +123,7 @@ void ParallelParsingInputFormat::parserThreadFunction(ThreadGroupStatusPtr threa
|
|||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
first_parser_finished.Notify();
|
first_parser_finished.set();
|
||||||
onBackgroundException(unit.offset);
|
onBackgroundException(unit.offset);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,18 +11,7 @@
|
|||||||
#include <Processors/Formats/IRowInputFormat.h>
|
#include <Processors/Formats/IRowInputFormat.h>
|
||||||
#include <Interpreters/Context.h>
|
#include <Interpreters/Context.h>
|
||||||
#include <common/logger_useful.h>
|
#include <common/logger_useful.h>
|
||||||
|
#include <Poco/Event.h>
|
||||||
/// I don't know why, but clang warns about static annotations
|
|
||||||
/// error: macro name is a reserved identifier [-Werror,-Wreserved-id-macro]
|
|
||||||
/// #define THREAD_ANNOTATION_ATTRIBUTE__(x) __attribute__((x))
|
|
||||||
#ifdef __clang__
|
|
||||||
#pragma clang diagnostic push
|
|
||||||
#pragma clang diagnostic ignored "-Wreserved-id-macro"
|
|
||||||
#endif
|
|
||||||
#include <absl/synchronization/notification.h>
|
|
||||||
#ifdef __clang__
|
|
||||||
#pragma clang diagnostic pop
|
|
||||||
#endif
|
|
||||||
|
|
||||||
namespace DB
|
namespace DB
|
||||||
{
|
{
|
||||||
@ -214,7 +203,7 @@ private:
|
|||||||
std::condition_variable reader_condvar;
|
std::condition_variable reader_condvar;
|
||||||
std::condition_variable segmentator_condvar;
|
std::condition_variable segmentator_condvar;
|
||||||
|
|
||||||
absl::Notification first_parser_finished;
|
Poco::Event first_parser_finished;
|
||||||
|
|
||||||
std::atomic<bool> parsing_finished{false};
|
std::atomic<bool> parsing_finished{false};
|
||||||
|
|
||||||
@ -269,7 +258,7 @@ private:
|
|||||||
});
|
});
|
||||||
/// We have to wait here to possibly extract ColumnMappingPtr from the first parser.
|
/// We have to wait here to possibly extract ColumnMappingPtr from the first parser.
|
||||||
if (ticket_number == 0)
|
if (ticket_number == 0)
|
||||||
first_parser_finished.WaitForNotification();
|
first_parser_finished.wait();
|
||||||
}
|
}
|
||||||
|
|
||||||
void finishAndWait()
|
void finishAndWait()
|
||||||
|
Loading…
Reference in New Issue
Block a user