Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

[core] Global settings API #16174

Merged
merged 6 commits into from
Feb 6, 2020
Merged

Conversation

alexshalamov
Copy link
Contributor

@alexshalamov alexshalamov commented Feb 3, 2020

Global settings API provides means of managing non-persistent in-process settings. Initial implementation contains support for experimental option for setting thread priorities.

GL-native keys have mapbox_ prefix. For instance "mapbox_thread_priority_worker"

Example:

auto& settings = Settings::getInstance();

// Sets thread priority value for worker threads
settings.set(EXPERIMENTAL_THREAD_PRIORITY_WORKER, Value{19.0});

// Gets thread priority value for worker threads
auto value = settings.get(EXPERIMENTAL_THREAD_PRIORITY_WORKER);

Launch Checklist

  • briefly describe the changes in this PR
  • write tests for all new functionality
  • document any changes to public APIs
  • tagged @mapbox/maps-android @mapbox/maps-ios @mapbox/core-sdk if this PR adds or updates a public API
  • apply needs changelog label if a changelog is needed (remove label when added)

/cc @mapbox/core-sdk @brunoabinader @mr1sunshine @nagineni

@alexshalamov alexshalamov force-pushed the alexshalamov_global_settings branch 4 times, most recently from bf9e2b6 to 98bfdb1 Compare February 5, 2020 11:48
@alexshalamov alexshalamov marked this pull request as ready for review February 5, 2020 12:32
@alexshalamov alexshalamov requested review from pozdnyakov and tmpsantos and removed request for 1ec5 February 5, 2020 12:32
@alexshalamov alexshalamov added the needs changelog Indicates PR needs a changelog entry prior to merging. label Feb 5, 2020
include/mbgl/platform/settings.hpp Outdated Show resolved Hide resolved
include/mbgl/util/thread.hpp Outdated Show resolved Hide resolved
include/mbgl/util/thread.hpp Outdated Show resolved Hide resolved
src/mbgl/platform/settings.cpp Show resolved Hide resolved
include/mbgl/platform/settings.hpp Outdated Show resolved Hide resolved
include/mbgl/util/thread_priority_setter.hpp Outdated Show resolved Hide resolved
include/mbgl/platform/settings.hpp Show resolved Hide resolved
@alexshalamov alexshalamov force-pushed the alexshalamov_global_settings branch 2 times, most recently from 2e5cbb7 to 2fbd46f Compare February 6, 2020 15:24
Change container types where number of elements expected
to be rather small. For instance, number of offline packs
or sql statements.
@alexshalamov alexshalamov removed the needs changelog Indicates PR needs a changelog entry prior to merging. label Feb 6, 2020
@alexshalamov alexshalamov merged commit d915e77 into master Feb 6, 2020
@alexshalamov alexshalamov deleted the alexshalamov_global_settings branch February 6, 2020 21:54
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants