summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--raul/Thread.hpp9
-rw-r--r--src/Thread.cpp13
2 files changed, 0 insertions, 22 deletions
diff --git a/raul/Thread.hpp b/raul/Thread.hpp
index 0eb3a9e..02a5e3a 100644
--- a/raul/Thread.hpp
+++ b/raul/Thread.hpp
@@ -30,8 +30,6 @@ struct ThreadImpl;
* Extend this and override the _run method to easily create a thread
* to perform some task.
*
- * The current Thread can be accessed using the get() method.
- *
* \ingroup raul
*/
class Thread : Noncopyable
@@ -39,13 +37,6 @@ class Thread : Noncopyable
public:
virtual ~Thread();
- /** Return the calling thread.
- *
- * If the calling thread does not yet have a Thread object associated with
- * it yet, one will be created with the given name.
- */
- static Thread& get(const std::string& name="");
-
/** Start the thread if it is not already running. */
virtual void start();
diff --git a/src/Thread.cpp b/src/Thread.cpp
index 5287beb..f5969d6 100644
--- a/src/Thread.cpp
+++ b/src/Thread.cpp
@@ -33,8 +33,6 @@ struct ThreadImpl {
pthread_t pthread;
};
-static ThreadVar<Thread*> self(NULL);
-
Thread::Thread(const std::string& name)
: _impl(new ThreadImpl())
, _name(name)
@@ -61,21 +59,10 @@ Thread::~Thread()
delete _impl;
}
-Thread&
-Thread::get(const std::string& name)
-{
- if (!self) {
- self = new Thread(pthread_self(), name);
- }
-
- return *self;
-}
-
void*
Thread::_static_run(void* thread)
{
Thread* me = static_cast<Thread*>(thread);
- self = me;
me->_run();
me->_thread_exists = false;
return NULL;