[core] make RunLoop::schedule public
This commit is contained in:
committed by
Ivo van Dongen
parent
edaa002c3c
commit
1ff8b3a799
@@ -62,6 +62,12 @@ public:
|
||||
push(task);
|
||||
return std::make_unique<WorkRequest>(task);
|
||||
}
|
||||
|
||||
void schedule(std::weak_ptr<Mailbox> mailbox) override {
|
||||
invoke([mailbox] () {
|
||||
Mailbox::maybeReceive(mailbox);
|
||||
});
|
||||
}
|
||||
|
||||
class Impl;
|
||||
|
||||
@@ -72,12 +78,6 @@ private:
|
||||
|
||||
void push(std::shared_ptr<WorkTask>);
|
||||
|
||||
void schedule(std::weak_ptr<Mailbox> mailbox) override {
|
||||
invoke([mailbox] () {
|
||||
Mailbox::maybeReceive(mailbox);
|
||||
});
|
||||
}
|
||||
|
||||
void withMutex(std::function<void()>&& fn) {
|
||||
std::lock_guard<std::mutex> lock(mutex);
|
||||
fn();
|
||||
|
||||
Reference in New Issue
Block a user