summaryrefslogtreecommitdiff
path: root/include/mbgl/actor/mailbox.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/mbgl/actor/mailbox.hpp')
-rw-r--r--include/mbgl/actor/mailbox.hpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/mbgl/actor/mailbox.hpp b/include/mbgl/actor/mailbox.hpp
index 8ecf91701a..1603ea4924 100644
--- a/include/mbgl/actor/mailbox.hpp
+++ b/include/mbgl/actor/mailbox.hpp
@@ -17,11 +17,15 @@ public:
void close();
void receive();
+
+ // Replace this mailbox's scheduler. Effectively allows a mailbox to be
+ // created on one thread and moved to another one.
+ void setScheduler(Scheduler* scheduler_);
static void maybeReceive(std::weak_ptr<Mailbox>);
private:
- Scheduler& scheduler;
+ Scheduler* scheduler;
std::recursive_mutex receivingMutex;
std::mutex pushingMutex;