diff options
author | Thiago Marcos P. Santos <thiago@mapbox.com> | 2015-03-13 14:22:09 +0200 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2015-03-18 12:38:39 +0100 |
commit | b52aab5f7c6625b219a68cc7a956cf895d158139 (patch) | |
tree | 52a13b1019274e4b7f6c30a304702350d9726955 /.clang-format | |
parent | 7b996012a51956842e46ef93239107d6a96e2a18 (diff) | |
download | qtlocation-mapboxgl-b52aab5f7c6625b219a68cc7a956cf895d158139.tar.gz |
Introduce the ThreadInfoStore and Environment::Scope
The Environment will now keep track of every thread that is running
within a Environment::Scope. Once the Scope object is created, it will
automatically register the thread to the ThreadInfoStore with some
additional information and it will automatically deregister as the stack
frame rewinds (which can be useful for Threads that are temporally in
use by an Environment like Workers).
The ThreadInfoStore could be using the thread-local storage, but I think
that making the Environment aware of what threads are associated to it
can be useful for writing a mechanism for posting messages between threads.
Withing a Scope, the Environment associated to the thread can be queried
at any time which will save us from juggling a reference to the
Environemnt around. Finally, the type of thread (Main, Map, etc) can
also be queried at any moment to make sure a piece of code is running
on the desired thread.
Diffstat (limited to '.clang-format')
0 files changed, 0 insertions, 0 deletions