@@ -69,6 +69,10 @@ class PyTaskDipatcher { | |||||
pybind11::gil_scoped_acquire _; | pybind11::gil_scoped_acquire _; | ||||
f(); | f(); | ||||
} | } | ||||
void on_async_queue_worker_thread_start() override { | |||||
mgb::sys::set_thread_name("py_task_worker"); | |||||
} | |||||
}; | }; | ||||
Queue queue; | Queue queue; | ||||
bool finalized = false; | bool finalized = false; | ||||
@@ -143,10 +143,15 @@ private: | |||||
size_t m_enable_evict = 0; | size_t m_enable_evict = 0; | ||||
struct WorkQueue : AsyncQueueSC<Command, WorkQueue> { | struct WorkQueue : AsyncQueueSC<Command, WorkQueue> { | ||||
WorkQueue(ChannelImpl* owner) : m_owner(owner) {} | |||||
WorkQueue(ChannelImpl* owner) : m_owner(owner) { | |||||
sys::set_thread_name("interpreter"); | |||||
} | |||||
void process_one_task(Command& cmd) { | void process_one_task(Command& cmd) { | ||||
m_owner->process_one_task(cmd); | m_owner->process_one_task(cmd); | ||||
} | } | ||||
void on_async_queue_worker_thread_start() override { | |||||
sys::set_thread_name("worker"); | |||||
} | |||||
private: | private: | ||||
ChannelImpl* m_owner; | ChannelImpl* m_owner; | ||||
} m_worker; | } m_worker; | ||||
@@ -44,6 +44,9 @@ class AsyncReleaser : public CompNodeDepedentObject { | |||||
std::this_thread::sleep_for(1us); | std::this_thread::sleep_for(1us); | ||||
add_task(std::move(param)); | add_task(std::move(param)); | ||||
} | } | ||||
void on_async_queue_worker_thread_start() override { | |||||
sys::set_thread_name("releaser"); | |||||
} | |||||
}; | }; | ||||
Waiter m_waiter{this}; | Waiter m_waiter{this}; | ||||