From 7f5e8664ea8e5e2ee580c093aa61b4451b2578a5 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 15 Aug 2012 21:58:45 +0000 Subject: Remove unused Raul::Thread::get(). git-svn-id: http://svn.drobilla.net/lad/trunk/raul@4706 a436a847-0d15-0410-975c-d299462d15a1 --- raul/Thread.hpp | 9 --------- src/Thread.cpp | 13 ------------- 2 files changed, 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 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); - self = me; me->_run(); me->_thread_exists = false; return NULL; -- cgit v1.2.1