VTK
9.2.6
|
#include <vtkThreadedTaskQueue.h>
Public Member Functions | |
vtkThreadedTaskQueue (std::function< void(Args...)> worker, bool strict_ordering=true, int buffer_size=-1, int max_concurrent_tasks=-1) | |
~vtkThreadedTaskQueue () | |
void | Push (Args &&... args) |
Push arguments for the work. | |
bool | IsEmpty () const |
Returns false if there's some result that may be popped right now or in the future. | |
void | Flush () |
Blocks till the queue becomes empty. | |
bool | Pop (void &result) |
Pop the last result. | |
bool | TryPop (void &result) |
Attempt to pop without waiting. |
Definition at line 126 of file vtkThreadedTaskQueue.h.
vtkThreadedTaskQueue< void, Args... >::vtkThreadedTaskQueue | ( | std::function< void(Args...)> | worker, |
bool | strict_ordering = true, | ||
int | buffer_size = -1, | ||
int | max_concurrent_tasks = -1 ) |
vtkThreadedTaskQueue< void, Args... >::~vtkThreadedTaskQueue | ( | ) |
void vtkThreadedTaskQueue< void, Args... >::Push | ( | Args &&... | args | ) |
Push arguments for the work.
bool vtkThreadedTaskQueue< void, Args... >::IsEmpty | ( | ) | const |
Returns false if there's some result that may be popped right now or in the future.
void vtkThreadedTaskQueue< void, Args... >::Flush | ( | ) |
Blocks till the queue becomes empty.
bool vtkThreadedTaskQueue< void, Args >::Pop | ( | void & | result | ) |
Pop the last result.
Returns true on success. May fail if called on an empty queue. This will wait for result to be available.
bool vtkThreadedTaskQueue< void, Args >::TryPop | ( | void & | result | ) |
Attempt to pop without waiting.
If not results are available, returns false.