alpaka
Abstraction Library for Parallel Kernel Acceleration
alpaka::core::CallbackThread Class Reference

#include <CallbackThread.hpp>

Public Member Functions

 ~CallbackThread ()
 
auto empty ()
 
template<typename NullaryFunction >
auto submit (NullaryFunction &&nf) -> std::future< void >
 It is guaranteed that the task is fully destroyed before the future's result is set. More...
 

Detailed Description

Definition at line 20 of file CallbackThread.hpp.

Constructor & Destructor Documentation

◆ ~CallbackThread()

alpaka::core::CallbackThread::~CallbackThread ( )
inline

Definition at line 58 of file CallbackThread.hpp.

Member Function Documentation

◆ empty()

auto alpaka::core::CallbackThread::empty ( )
inline
Returns
True if queue is empty and no task is executed else false. If only one tasks is enqueued and the task is executed the task will see the queue as not empty. During the destruction of this single enqueued task the queue will already be accounted as empty.

Definition at line 109 of file CallbackThread.hpp.

◆ submit()

template<typename NullaryFunction >
auto alpaka::core::CallbackThread::submit ( NullaryFunction &&  nf) -> std::future<void>
inline

It is guaranteed that the task is fully destroyed before the future's result is set.

Definition at line 80 of file CallbackThread.hpp.


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