launch_daemon: give the main worker thread a different name.

* It's now called "main worker" instead of just worker.
This commit is contained in:
Axel Dörfler
2015-11-06 22:49:10 +01:00
parent 3282b758b0
commit c2f71fa688
2 changed files with 17 additions and 1 deletions
+15 -1
View File
@@ -31,7 +31,7 @@ Worker::~Worker()
status_t
Worker::Init()
{
fThread = spawn_thread(&Worker::_Process, "worker", B_NORMAL_PRIORITY,
fThread = spawn_thread(&Worker::_Process, Name(), B_NORMAL_PRIORITY,
this);
if (fThread < 0)
return fThread;
@@ -70,6 +70,13 @@ Worker::Timeout() const
}
const char*
Worker::Name() const
{
return "worker";
}
status_t
Worker::Run(BJob* job)
{
@@ -110,6 +117,13 @@ MainWorker::Timeout() const
}
const char*
MainWorker::Name() const
{
return "main worker";
}
status_t
MainWorker::Run(BJob* job)
{
+2
View File
@@ -24,6 +24,7 @@ public:
protected:
virtual status_t Process();
virtual bigtime_t Timeout() const;
virtual const char* Name() const;
virtual status_t Run(BJob* job);
private:
@@ -41,6 +42,7 @@ public:
protected:
virtual bigtime_t Timeout() const;
virtual const char* Name() const;
virtual status_t Run(BJob* job);
private: