[macos,ios] initialize util::RunLoop in SDK rather than by default
This commit is contained in:
committed by
John Firebaugh
parent
7bcb04a609
commit
08809b4d44
@@ -8,7 +8,6 @@ namespace mbgl {
|
||||
namespace util {
|
||||
|
||||
static ThreadLocal<RunLoop>& current = *new ThreadLocal<RunLoop>;
|
||||
static RunLoop mainRunLoop;
|
||||
|
||||
class RunLoop::Impl {
|
||||
public:
|
||||
@@ -22,6 +21,7 @@ RunLoop* RunLoop::Get() {
|
||||
|
||||
RunLoop::RunLoop(Type)
|
||||
: impl(std::make_unique<Impl>()) {
|
||||
assert(!current.get());
|
||||
current.set(this);
|
||||
impl->async = std::make_unique<AsyncTask>(std::bind(&RunLoop::process, this));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user