diff options
Diffstat (limited to 'include/mbgl/actor/scheduler.hpp')
-rw-r--r-- | include/mbgl/actor/scheduler.hpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/mbgl/actor/scheduler.hpp b/include/mbgl/actor/scheduler.hpp index ca34901cfd..7338c3ab3a 100644 --- a/include/mbgl/actor/scheduler.hpp +++ b/include/mbgl/actor/scheduler.hpp @@ -1,5 +1,7 @@ #pragma once +#include <mapbox/weak.hpp> + #include <functional> #include <memory> @@ -35,6 +37,8 @@ public: // Enqueues a function for execution. virtual void schedule(std::function<void()>) = 0; + // Makes a weak pointer to this Scheduler. + virtual mapbox::base::WeakPtr<Scheduler> makeWeakPtr() = 0; // Set/Get the current Scheduler for this thread static Scheduler* GetCurrent(); |