1#ifndef AMREX_BACKGROUND_THREAD_H_
2#define AMREX_BACKGROUND_THREAD_H_
3#include <AMReX_Config.H>
6#include <condition_variable>
25 void Submit (std::function<
void()>&& a_f);
26 void Submit (std::function<
void()>
const& a_f);
37 std::queue<std::function<void()> >
m_func;
Definition AMReX_BackgroundThread.H:16
void Finish()
Definition AMReX_BackgroundThread.cpp:52
BackgroundThread()
Definition AMReX_BackgroundThread.cpp:5
bool m_finalizing
Definition AMReX_BackgroundThread.H:39
std::unique_ptr< std::thread > m_thread
Definition AMReX_BackgroundThread.H:33
void Submit(std::function< void()> &&a_f)
Definition AMReX_BackgroundThread.cpp:38
bool m_clearing
Definition AMReX_BackgroundThread.H:38
std::condition_variable m_job_cond
Definition AMReX_BackgroundThread.H:35
void do_job()
Definition AMReX_BackgroundThread.cpp:19
std::mutex m_mutx
Definition AMReX_BackgroundThread.H:34
~BackgroundThread()
Definition AMReX_BackgroundThread.cpp:10
std::queue< std::function< void()> > m_func
Definition AMReX_BackgroundThread.H:37
BackgroundThread & operator=(BackgroundThread const &)=delete
BackgroundThread(BackgroundThread const &)=delete
std::condition_variable m_done_cond
Definition AMReX_BackgroundThread.H:36
BackgroundThread(BackgroundThread &&)=delete
Definition AMReX_Amr.cpp:49