#include <run_loop.hpp>
|
| RunLoop (Type type=Type::Default) |
|
| ~RunLoop () override |
|
void | run () |
|
void | runOnce () |
|
void | stop () |
|
void | setPlatformCallback (std::function< void()> callback) |
|
void | addWatch (int fd, Event, std::function< void(int, Event)> &&callback) |
|
void | removeWatch (int fd) |
|
template<class Fn , class... Args> |
void | invoke (Priority priority, Fn &&fn, Args &&... args) |
|
template<class Fn , class... Args> |
void | invoke (Fn &&fn, Args &&... args) |
|
template<class Fn , class... Args> |
std::unique_ptr< AsyncRequest > | invokeCancellable (Fn &&fn, Args &&... args) |
|
void | schedule (std::function< void()> fn) override |
| Enqueues a function for execution. More...
|
|
::mapbox::base::WeakPtr< Scheduler > | makeWeakPtr () override |
| Makes a weak pointer to this Scheduler. More...
|
|
virtual | ~Scheduler ()=default |
|
std::function< void()> | bindOnce (std::function< void()>) |
|
template<typename TaskFn , typename ReplyFn > |
void | scheduleAndReplyValue (const TaskFn &task, const ReplyFn &reply) |
|
|
template<typename TaskFn , typename ReplyFn > |
void | scheduleAndReplyValue (const TaskFn &task, const ReplyFn &reply, mapbox::base::WeakPtr< Scheduler > replyScheduler) |
|
Definition at line 21 of file run_loop.hpp.
◆ Event
Enumerator |
---|
None | |
Read | |
Write | |
ReadWrite | |
Definition at line 34 of file run_loop.hpp.
◆ Priority
◆ Type
◆ RunLoop()
◆ ~RunLoop()
mbgl::util::RunLoop::~RunLoop |
( |
| ) |
|
|
override |
◆ addWatch()
void mbgl::util::RunLoop::addWatch |
( |
int |
fd, |
|
|
Event |
, |
|
|
std::function< void(int, Event)> && |
callback |
|
) |
| |
◆ Get()
static RunLoop* mbgl::util::RunLoop::Get |
( |
| ) |
|
|
static |
◆ getLoopHandle()
static LOOP_HANDLE mbgl::util::RunLoop::getLoopHandle |
( |
| ) |
|
|
static |
◆ invoke() [1/2]
template<class Fn , class... Args>
void mbgl::util::RunLoop::invoke |
( |
Fn && |
fn, |
|
|
Args &&... |
args |
|
) |
| |
|
inline |
◆ invoke() [2/2]
template<class Fn , class... Args>
void mbgl::util::RunLoop::invoke |
( |
Priority |
priority, |
|
|
Fn && |
fn, |
|
|
Args &&... |
args |
|
) |
| |
|
inline |
◆ invokeCancellable()
template<class Fn , class... Args>
std::unique_ptr<AsyncRequest> mbgl::util::RunLoop::invokeCancellable |
( |
Fn && |
fn, |
|
|
Args &&... |
args |
|
) |
| |
|
inline |
◆ makeWeakPtr()
::mapbox::base::WeakPtr<Scheduler> mbgl::util::RunLoop::makeWeakPtr |
( |
| ) |
|
|
inlineoverridevirtual |
◆ removeWatch()
void mbgl::util::RunLoop::removeWatch |
( |
int |
fd | ) |
|
◆ run()
void mbgl::util::RunLoop::run |
( |
| ) |
|
◆ runOnce()
void mbgl::util::RunLoop::runOnce |
( |
| ) |
|
◆ schedule()
void mbgl::util::RunLoop::schedule |
( |
std::function< void()> |
| ) |
|
|
inlineoverridevirtual |
◆ setPlatformCallback()
void mbgl::util::RunLoop::setPlatformCallback |
( |
std::function< void()> |
callback | ) |
|
|
inline |
Platform integration callback for platforms that do not have full run loop integration or don't want to block at the Mapbox GL Native loop. It will be called from any thread and is up to the platform to, after receiving the callback, call RunLoop::runOnce() from the same thread as the Map object lives.
Definition at line 56 of file run_loop.hpp.
◆ stop()
void mbgl::util::RunLoop::stop |
( |
| ) |
|
The documentation for this class was generated from the following file:
- /home/runner/work/maplibre-native/maplibre-native/include/mbgl/util/run_loop.hpp