diff options
author | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-10-07 15:45:45 +0300 |
---|---|---|
committer | Mikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com> | 2019-10-07 16:42:40 +0300 |
commit | 23cebe20fed0e3ebc3328c6345af4e32d86cfcf5 (patch) | |
tree | af3c1837435967b0e2ec425b3c2a00822166d38b /src/mbgl/actor/scheduler.cpp | |
parent | bd283fc1be2f90ce02b37617411a0ce4246d898e (diff) | |
download | qtlocation-mapboxgl-23cebe20fed0e3ebc3328c6345af4e32d86cfcf5.tar.gz |
[core] Introduce SequencedScheduler and ParallelScheduler
This commit refactors `utils::ThreadPool` into a template
`ThreadedScheduler` class and provides aux type aliases.
So that it is possible to obtain a sequenced schedule,where
all the scheduled tasks are guarantied to be executed
consequently.
The sequenced lightweight scheduler is required by both the
orchestration thread and the refactored `FileSource` implementation.
Diffstat (limited to 'src/mbgl/actor/scheduler.cpp')
-rw-r--r-- | src/mbgl/actor/scheduler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mbgl/actor/scheduler.cpp b/src/mbgl/actor/scheduler.cpp index cb0c7728ec..5fd9a133bd 100644 --- a/src/mbgl/actor/scheduler.cpp +++ b/src/mbgl/actor/scheduler.cpp @@ -28,7 +28,7 @@ std::shared_ptr<Scheduler> Scheduler::GetBackground() { std::shared_ptr<Scheduler> scheduler = weak.lock(); if (!scheduler) { - weak = scheduler = std::make_shared<ThreadPool>(4); + weak = scheduler = std::make_shared<ThreadPool>(); } return scheduler; |