diff options
author | Juha Alanen <juha.alanen@mapbox.com> | 2020-01-09 15:58:44 +0200 |
---|---|---|
committer | Juha Alanen <juha.alanen@mapbox.com> | 2020-01-10 17:19:30 +0200 |
commit | f24e4ca0689c023cf5499c4a78ba7a20b3e9a4c0 (patch) | |
tree | 83a62370228668f156cd0bcaea814b7f30a7c072 | |
parent | 60a4b3eda3d2d144a5845505649beeaefde6055b (diff) | |
download | qtlocation-mapboxgl-f24e4ca0689c023cf5499c4a78ba7a20b3e9a4c0.tar.gz |
[android] Fix a RunLoop bug where tasks are run only once
Do not remove tasks from the RunLoop in processRunnables(). Otherwise
the task is run only once.
-rw-r--r-- | platform/android/src/run_loop.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/platform/android/src/run_loop.cpp b/platform/android/src/run_loop.cpp index a9cbfb57aa..d62816d8cd 100644 --- a/platform/android/src/run_loop.cpp +++ b/platform/android/src/run_loop.cpp @@ -170,11 +170,10 @@ Milliseconds RunLoop::Impl::processRunnables() { auto const dueTime = runnable->dueTime(); if (dueTime <= now) { tmp.push_back(runnable); - runnables.erase(it++); } else { nextDue = std::min(nextDue, dueTime); - ++it; } + ++it; } } |