![]() |
Parolin 0.7.9 6796
Console (soon DLLs) to do a tar like job
|
Unbounded thread-safe work queue. More...
#include <WorkQueue.h>
Public Member Functions | |
| WorkQueue (std::size_t maxSize=0) | |
| bool | push (T &&item) |
| bool | pop (T &item) |
| void | setMaxSize (std::size_t maxSize) |
| void | finish () |
| void | waitUntilFinished () |
Blocks until finish() has been called (but the queue may not be empty). | |
| WorkQueue (std::size_t maxSize=0) | |
| bool | push (T &&item) |
| bool | pop (T &item) |
| void | setMaxSize (std::size_t maxSize) |
| void | finish () |
| void | waitUntilFinished () |
Blocks until finish() has been called (but the queue may not be empty). | |
| WorkQueue (std::size_t maxSize=0) | |
| bool | push (T &&item) |
| bool | pop (T &item) |
| void | setMaxSize (std::size_t maxSize) |
| void | finish () |
| void | waitUntilFinished () |
Blocks until finish() has been called (but the queue may not be empty). | |
Unbounded thread-safe work queue.
|
inline |
Constructs an empty work queue with an optional max size. If maxSize == 0 the queue size is unbounded.
| maxSize | The maximum allowed size of the work queue. |
|
inline |
Constructs an empty work queue with an optional max size. If maxSize == 0 the queue size is unbounded.
| maxSize | The maximum allowed size of the work queue. |
|
inline |
Constructs an empty work queue with an optional max size. If maxSize == 0 the queue size is unbounded.
| maxSize | The maximum allowed size of the work queue. |
|
inline |
Promise that push() won't be called again, so once the queue is empty there will never any more work.
|
inline |
Promise that push() won't be called again, so once the queue is empty there will never any more work.
|
inline |
Promise that push() won't be called again, so once the queue is empty there will never any more work.
|
inline |
Attempts to pop an item off the work queue. It will block until data is available or finish() has been called.
| [out] | item | If pop returns true, it contains the popped item. If pop returns false, it is unmodified. |
finish() has been called.
|
inline |
Attempts to pop an item off the work queue. It will block until data is available or finish() has been called.
| [out] | item | If pop returns true, it contains the popped item. If pop returns false, it is unmodified. |
finish() has been called.
|
inline |
Attempts to pop an item off the work queue. It will block until data is available or finish() has been called.
| [out] | item | If pop returns true, it contains the popped item. If pop returns false, it is unmodified. |
finish() has been called.
|
inline |
|
inline |
|
inline |
|
inline |
Sets the maximum queue size. If maxSize == 0 then it is unbounded.
| maxSize | The new maximum queue size. |
|
inline |
Sets the maximum queue size. If maxSize == 0 then it is unbounded.
| maxSize | The new maximum queue size. |
|
inline |
Sets the maximum queue size. If maxSize == 0 then it is unbounded.
| maxSize | The new maximum queue size. |
|
inline |
Blocks until finish() has been called (but the queue may not be empty).
|
inline |
Blocks until finish() has been called (but the queue may not be empty).
|
inline |
Blocks until finish() has been called (but the queue may not be empty).