[core] Decouple Scheduler interface from actor model

So that it is possible to schedule normal `std::function` and use `mapbox::base::WeakPtr`.
This commit is contained in:
Mikhail Pozdnyakov
2019-10-04 12:30:41 +03:00
parent 198e345339
commit bef635765a
13 changed files with 38 additions and 39 deletions

View File

@@ -101,7 +101,7 @@ TEST(Actor, DestructionBlocksOnSend) {
EXPECT_TRUE(waited.load());
}
void schedule(std::weak_ptr<Mailbox>) final {
void schedule(std::function<void()>) final {
promise.set_value();
future.wait();
std::this_thread::sleep_for(1ms);