[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

@@ -43,7 +43,7 @@ ActorRef<Renderer> MapRenderer::actor() const {
return *rendererRef;
}
void MapRenderer::schedule(std::weak_ptr<Mailbox> scheduled) {
void MapRenderer::schedule(std::function<void()> scheduled) {
// Create a runnable
android::UniqueEnv _env = android::AttachEnv();
auto runnable = std::make_unique<MapRendererRunnable>(*_env, std::move(scheduled));