Utility class running deferred work on a single background thread.
More...
#include <AMReX_BackgroundThread.H>
Utility class running deferred work on a single background thread.
◆ BackgroundThread() [1/3]
| amrex::BackgroundThread::BackgroundThread |
( |
| ) |
|
Launch the worker thread and initialize synchronization primitives.
◆ ~BackgroundThread()
| amrex::BackgroundThread::~BackgroundThread |
( |
| ) |
|
Stop the worker thread and drain any queued work.
◆ BackgroundThread() [2/3]
| amrex::BackgroundThread::BackgroundThread |
( |
BackgroundThread const & | | ) |
|
|
delete |
◆ BackgroundThread() [3/3]
| amrex::BackgroundThread::BackgroundThread |
( |
BackgroundThread && | | ) |
|
|
delete |
◆ Finish()
| void amrex::BackgroundThread::Finish |
( |
| ) |
|
Block the caller until all queued jobs have completed.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ Submit() [1/2]
| void amrex::BackgroundThread::Submit |
( |
std::function< void()> && | a_f | ) |
|
Enqueue a job that will run asynchronously on the worker thread.
- Parameters
-
| a_f | Functor representing the work to execute. |
◆ Submit() [2/2]
| void amrex::BackgroundThread::Submit |
( |
std::function< void()> const & | a_f | ) |
|
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
The documentation for this class was generated from the following files: