Skip to content
Snippets Groups Projects
Commit d0233b7f authored by Tristan Matthews's avatar Tristan Matthews
Browse files

eventthread: cleanup

parent 6614ee1e
No related branches found
No related tags found
No related merge requests found
...@@ -31,17 +31,15 @@ ...@@ -31,17 +31,15 @@
#include "eventthread.h" #include "eventthread.h"
#include "voiplink.h" #include "voiplink.h"
/********************************** Voiplink thread *************************************/ EventThread::EventThread(VoIPLink *link) : Thread(), link_(link)
EventThread::EventThread(VoIPLink *link)
: Thread(), link_(link)
{ {
setCancel(cancelDeferred); setCancel(cancelDeferred);
} }
EventThread::~EventThread() {
ost::Thread::terminate();
}
/**
* Reimplementation of run()
*/
void EventThread::run() void EventThread::run()
{ {
while (!testCancel()) while (!testCancel())
......
...@@ -28,8 +28,8 @@ ...@@ -28,8 +28,8 @@
* as that of the covered work. * as that of the covered work.
*/ */
#ifndef __EVENT_THREAD_H__ #ifndef EVENT_THREAD_H_
#define __EVENT_THREAD_H__ #define EVENT_THREAD_H_
#include <cc++/thread.h> #include <cc++/thread.h>
#include "noncopyable.h" #include "noncopyable.h"
...@@ -38,24 +38,19 @@ class VoIPLink; ...@@ -38,24 +38,19 @@ class VoIPLink;
/** /**
* @file eventthread.h * @file eventthread.h
* @brief General thread to listen events continuously * @brief Thread which listens to VoIP events continuously
*/ */
class EventThread : public ost::Thread { class EventThread : public ost::Thread {
public: public:
EventThread(VoIPLink* link); EventThread(VoIPLink* link);
~EventThread();
~EventThread() {
terminate();
}
virtual void run(); virtual void run();
private: private:
NON_COPYABLE(EventThread); NON_COPYABLE(EventThread);
// VoIPLink is the object being called by getEvents() method // VoIPLink is the object being called by getEvents() method
VoIPLink* link_; VoIPLink* link_;
}; };
#endif // __EVENT_THREAD_H__ #endif // EVENT_THREAD_H__
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment