Mirror von
https://github.com/tkuschel/bees.git
synchronisiert 2026-06-19 06:57:54 +02:00
status: report number of active worker threads in status output
This is especially useful when dynamic load management allocates more worker threads than active tasks, so the extra threads are effectively invisible. Signed-off-by: Zygo Blaxell <bees@furryterror.org>
Dieser Commit ist enthalten in:
@@ -128,6 +128,7 @@ namespace crucible {
|
||||
static void push_back(shared_ptr<TaskState> task);
|
||||
static void push_front(shared_ptr<TaskState> task);
|
||||
size_t get_queue_count();
|
||||
size_t get_thread_count();
|
||||
};
|
||||
|
||||
class TaskConsumer : public enable_shared_from_this<TaskConsumer> {
|
||||
@@ -324,6 +325,13 @@ namespace crucible {
|
||||
return s_tms->m_queue.size();
|
||||
}
|
||||
|
||||
size_t
|
||||
TaskMaster::get_thread_count()
|
||||
{
|
||||
unique_lock<mutex> lock(s_tms->m_mutex);
|
||||
return s_tms->m_threads.size();
|
||||
}
|
||||
|
||||
ostream &
|
||||
TaskMaster::print_queue(ostream &os)
|
||||
{
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren