From f024a3ed79e438b975301e5781b12739e150caf1 Mon Sep 17 00:00:00 2001 From: Mikhail Pozdnyakov Date: Fri, 4 Oct 2019 12:30:41 +0300 Subject: [core] Decouple Scheduler interface from actor model So that it is possible to schedule normal `std::function` and use `mapbox::base::WeakPtr`. --- platform/qt/src/qmapboxgl_scheduler.hpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'platform/qt/src/qmapboxgl_scheduler.hpp') diff --git a/platform/qt/src/qmapboxgl_scheduler.hpp b/platform/qt/src/qmapboxgl_scheduler.hpp index 68636d0d11..b34dd3d5b8 100644 --- a/platform/qt/src/qmapboxgl_scheduler.hpp +++ b/platform/qt/src/qmapboxgl_scheduler.hpp @@ -1,6 +1,5 @@ #pragma once -#include #include #include @@ -19,7 +18,7 @@ public: virtual ~QMapboxGLScheduler(); // mbgl::Scheduler implementation. - void schedule(std::weak_ptr scheduled) final; + void schedule(std::function scheduled) final; void processEvents(); @@ -30,5 +29,5 @@ private: MBGL_STORE_THREAD(tid); std::mutex m_taskQueueMutex; - std::queue> m_taskQueue; + std::queue> m_taskQueue; }; -- cgit v1.2.1