|
Maestro 0.1.0
Unified interface for quantum circuit simulation
|
WorkerThread class for a thread in a threads pool. More...
#include <WorkerThread.h>
Public Member Functions | |
| WorkerThread (ThreadsPool *threadsPool) | |
| Construct a new Worker Thread object. | |
| ~WorkerThread () | |
| Destroy the Worker Thread object. | |
| void | Start () |
| Start the thread. | |
| void | Stop () |
| Stop the thread. | |
| void | SetStopUnlocked () |
| Set the stop flag without locking it. | |
| void | Join () |
| Join the thread. | |
WorkerThread class for a thread in a threads pool.
A thread that is used in a threads pool, executing jobs.
| ThreadsPool | The threads pool class. |
| Job | The job class/type. |
Definition at line 33 of file WorkerThread.h.
|
inlineexplicit |
Construct a new Worker Thread object.
Constructs a new Worker Thread object, associated with the given threads pool. The thread is started immediately.
| threadsPool | The threads pool that this thread belongs to. |
Definition at line 43 of file WorkerThread.h.
|
inline |
Destroy the Worker Thread object.
Destroys the Worker Thread object, stopping the thread if it is still running.
Definition at line 54 of file WorkerThread.h.
|
inline |
Join the thread.
Joins the thread if it is joinable, waiting for it to finish.
Definition at line 102 of file WorkerThread.h.
|
inline |
Set the stop flag without locking it.
Sets the stop flag to true without locking the threads pool mutex.
Definition at line 95 of file WorkerThread.h.
|
inline |
Start the thread.
Starts the thread if not already started.
Definition at line 61 of file WorkerThread.h.
|
inline |
Stop the thread.
Stops the thread if it is running, and waits for it to finish.
Definition at line 77 of file WorkerThread.h.