MapLibre Native Core
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
mbgl::WorkTaskImpl< F, P > Class Template Reference

#include <work_task_impl.hpp>

Inheritance diagram for mbgl::WorkTaskImpl< F, P >:
mbgl::WorkTask mbgl::util::non_copyable_::noncopyable

Public Member Functions

 WorkTaskImpl (F f, P p, std::shared_ptr< std::atomic< bool >> canceled_)
 
void operator() () override
 
void cancel () override
 
- Public Member Functions inherited from mbgl::WorkTask
virtual ~WorkTask ()=default
 
template<class Fn , class... Args>
std::shared_ptr< WorkTaskmake (Fn &&fn, Args &&... args)
 

Additional Inherited Members

- Static Public Member Functions inherited from mbgl::WorkTask
template<class Fn , class... Args>
static std::shared_ptr< WorkTaskmake (Fn &&, Args &&...)
 

Detailed Description

template<class F, class P>
class mbgl::WorkTaskImpl< F, P >

Definition at line 11 of file work_task_impl.hpp.

Constructor & Destructor Documentation

◆ WorkTaskImpl()

template<class F , class P >
mbgl::WorkTaskImpl< F, P >::WorkTaskImpl ( f,
p,
std::shared_ptr< std::atomic< bool >>  canceled_ 
)
inline

Definition at line 13 of file work_task_impl.hpp.

Member Function Documentation

◆ cancel()

template<class F , class P >
void mbgl::WorkTaskImpl< F, P >::cancel ( )
inlineoverridevirtual

If the task has not yet begun, this will cancel it. If the task is in progress, this will block until it completed. (Currently necessary because of shared state, but should be removed.) It will also cancel the after callback. If the task has completed, but the after callback has not executed, this will cancel the after callback. If the task has completed and the after callback has executed, this will do nothing.

Implements mbgl::WorkTask.

Definition at line 35 of file work_task_impl.hpp.

◆ operator()()

template<class F , class P >
void mbgl::WorkTaskImpl< F, P >::operator() ( )
inlineoverridevirtual

Implements mbgl::WorkTask.

Definition at line 19 of file work_task_impl.hpp.


The documentation for this class was generated from the following file: