协程调度器,重大更新
This commit is contained in:
@@ -98,7 +98,11 @@ public:
|
||||
Frequency_Limit statistic_fl;
|
||||
std::string thread_key() const;
|
||||
void test_and_attach_thread();
|
||||
void test_and_stop_thread() const;
|
||||
void test_and_stop_thread();
|
||||
bool data_source_loop_should_run() const;
|
||||
std::uint64_t data_source_loop_generation() const;
|
||||
bool try_mark_data_source_loop_running();
|
||||
void mark_data_source_loop_stopped();
|
||||
Psc::JSON statistic_json() {
|
||||
Psc::JSON ret = Psc::JSON::object();
|
||||
Ret_J(enable);
|
||||
@@ -173,6 +177,9 @@ protected:
|
||||
|
||||
|
||||
bool _open_ = false;
|
||||
std::atomic<bool> data_source_loop_requested_ = false;
|
||||
std::atomic<bool> data_source_loop_running_ = false;
|
||||
std::atomic<std::uint64_t> data_source_loop_generation_ = 0;
|
||||
virtual bool _open() = 0;
|
||||
virtual void _close() = 0;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user