[core] Rename ThreadedObject to Thread

Now that the old Thread class is gone, we can give ThreadedObject
a better name.
This commit is contained in:
Thiago Marcos P. Santos
2017-06-21 13:38:49 +03:00
parent 1427628c56
commit 7e8bdadb91
16 changed files with 67 additions and 67 deletions

View File

@@ -3,7 +3,7 @@
#include <mbgl/storage/file_source_request.hpp>
#include <mbgl/storage/response.hpp>
#include <mbgl/util/util.hpp>
#include <mbgl/util/threaded_object.hpp>
#include <mbgl/util/thread.hpp>
#include <mbgl/util/url.hpp>
#include <android/asset_manager.h>
@@ -40,7 +40,7 @@ private:
AssetManagerFileSource::AssetManagerFileSource(jni::JNIEnv& env, jni::Object<android::AssetManager> assetManager_)
: assetManager(assetManager_.NewGlobalRef(env)),
impl(std::make_unique<util::ThreadedObject<Impl>>("AssetManagerFileSource",
impl(std::make_unique<util::Thread<Impl>>("AssetManagerFileSource",
AAssetManager_fromJava(&env, jni::Unwrap(**assetManager)))) {
}

View File

@@ -9,7 +9,7 @@
namespace mbgl {
namespace util {
template <typename T> class ThreadedObject;
template <typename T> class Thread;
} // namespace util
class AssetManagerFileSource : public FileSource {
@@ -23,7 +23,7 @@ private:
class Impl;
jni::UniqueObject<android::AssetManager> assetManager;
std::unique_ptr<util::ThreadedObject<Impl>> impl;
std::unique_ptr<util::Thread<Impl>> impl;
};
} // namespace mbgl

View File

@@ -2,7 +2,7 @@
#include <mbgl/util/platform.hpp>
#include <mbgl/util/thread_local.hpp>
#include <mbgl/util/threaded_object.hpp>
#include <mbgl/util/thread.hpp>
#include <mbgl/util/timer.hpp>
#include <android/looper.h>
@@ -105,7 +105,7 @@ RunLoop::Impl::Impl(RunLoop* runLoop_, RunLoop::Type type) : runLoop(runLoop_) {
case Type::Default:
ret = ALooper_addFd(loop, fds[PIPE_OUT], ALOOPER_POLL_CALLBACK,
ALOOPER_EVENT_INPUT, looperCallbackDefault, this);
alarm = std::make_unique<ThreadedObject<Alarm>>("Alarm", this);
alarm = std::make_unique<Thread<Alarm>>("Alarm", this);
running = true;
break;
}

View File

@@ -15,7 +15,7 @@ struct ALooper;
namespace mbgl {
namespace util {
template <typename T> class ThreadedObject;
template <typename T> class Thread;
class Alarm;
class RunLoop::Impl {
@@ -53,7 +53,7 @@ private:
JNIEnv *env = nullptr;
bool detach = false;
std::unique_ptr<ThreadedObject<Alarm>> alarm;
std::unique_ptr<Thread<Alarm>> alarm;
std::recursive_mutex mtx;
std::list<Runnable*> runnables;