VTK  9.2.6
vtkThreadedTaskQueue< void, Args... > Class Template Reference

#include <vtkThreadedTaskQueue.h>

Inheritance diagram for vtkThreadedTaskQueue< void, Args... >:
[legend]
Collaboration diagram for vtkThreadedTaskQueue< void, Args... >:
[legend]

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.

Detailed Description

template<typename... Args>
class vtkThreadedTaskQueue< void, Args... >

Definition at line 126 of file vtkThreadedTaskQueue.h.

Constructor & Destructor Documentation

◆ vtkThreadedTaskQueue()

template<typename... Args>
vtkThreadedTaskQueue< void, Args... >::vtkThreadedTaskQueue ( std::function< void(Args...)> worker,
bool strict_ordering = true,
int buffer_size = -1,
int max_concurrent_tasks = -1 )

◆ ~vtkThreadedTaskQueue()

template<typename... Args>
vtkThreadedTaskQueue< void, Args... >::~vtkThreadedTaskQueue ( )

Member Function Documentation

◆ Push()

template<typename... Args>
void vtkThreadedTaskQueue< void, Args... >::Push ( Args &&... args)

Push arguments for the work.

◆ IsEmpty()

template<typename... Args>
bool vtkThreadedTaskQueue< void, Args... >::IsEmpty ( ) const

Returns false if there's some result that may be popped right now or in the future.

◆ Flush()

template<typename... Args>
void vtkThreadedTaskQueue< void, Args... >::Flush ( )

Blocks till the queue becomes empty.

◆ Pop()

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.

◆ TryPop()

bool vtkThreadedTaskQueue< void, Args >::TryPop ( void & result)

Attempt to pop without waiting.

If not results are available, returns false.


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