summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Socket.cc9
-rw-r--r--src/TaskMan.cc9
-rw-r--r--src/Threads.cc2
3 files changed, 4 insertions, 16 deletions
diff --git a/src/Socket.cc b/src/Socket.cc
index 2f9fa17..56e2dfb 100644
--- a/src/Socket.cc
+++ b/src/Socket.cc
@@ -175,22 +175,17 @@ static const char * inet_ntop(int af, const void * src, char * dst, socklen_t si
#if 0
// TODO: use getaddrinfo_a, if available.
#else
-class ResolverThread : public Balau::Thread, public Balau::AtStart {
+class ResolverThread : public Balau::GlobalThread {
public:
- ResolverThread() : Thread(true), AtStart(8), m_stopping(false) { }
+ ResolverThread() : GlobalThread(8), m_stopping(false) { }
void pushRequest(DNSRequest * req) { m_queue.push(req); }
private:
virtual void * proc();
- virtual void doStart();
virtual void threadExit();
Balau::Queue<DNSRequest> m_queue;
volatile bool m_stopping;
};
-void ResolverThread::doStart() {
- threadStart();
-}
-
void ResolverThread::threadExit() {
m_stopping = true;
DNSRequest req;
diff --git a/src/TaskMan.cc b/src/TaskMan.cc
index ba74c8f..a1d8255 100644
--- a/src/TaskMan.cc
+++ b/src/TaskMan.cc
@@ -27,12 +27,11 @@ static const int TOO_MANY_STACKS = 1024;
namespace Balau {
-class TaskScheduler : public Thread, public AtStart {
+class TaskScheduler : public GlobalThread {
public:
- TaskScheduler() : Thread(true), AtStart(100), m_stopping(false) { }
+ TaskScheduler() : GlobalThread(100), m_stopping(false) { }
void registerTask(Task * t);
virtual void * proc();
- virtual void doStart();
virtual void threadExit();
void registerTaskMan(TaskMan * t);
void unregisterTaskMan(TaskMan * t);
@@ -120,10 +119,6 @@ void * Balau::TaskScheduler::proc() {
return NULL;
}
-void Balau::TaskScheduler::doStart() {
- threadStart();
-}
-
void Balau::TaskScheduler::threadExit() {
Task * s = NULL;
m_queue.push(s);
diff --git a/src/Threads.cc b/src/Threads.cc
index df19da2..de70933 100644
--- a/src/Threads.cc
+++ b/src/Threads.cc
@@ -57,5 +57,3 @@ void Balau::Thread::threadStart() {
r = pthread_attr_destroy(&attr);
RAssert(r == 0, "Couldn't destroy pthread attribute; r = %i", r);
}
-
-void Balau::Thread::threadExit() { }