#include <ForEachImage.h>
Public Member Functions | |
| ImagePool (const ImagePool &)=delete | |
| ImagePool & | operator= (const ImagePool &)=delete |
| ~ImagePool () | |
| void | run (long n, const std::function< void(long)> &work) |
| std::size_t | threads () const noexcept |
| void | ensureThreads (std::size_t n) |
Static Public Member Functions | |
| static ImagePool & | instance () |
Private Member Functions | |
| ImagePool () | |
| void | drain () |
| void | loop (long index) |
Static Private Member Functions | |
| static void | serial (long n, const std::function< void(long)> &work) |
Private Attributes | |
| std::vector< std::thread > | threads_ |
| std::mutex | runMutex_ |
| std::mutex | mutex_ |
| std::condition_variable | wake_ |
| std::condition_variable | done_ |
| const std::function< void(long)> * | work_ {nullptr} |
| long | n_ {0} |
| std::atomic< long > | next_ {1} |
| std::exception_ptr | failure_ |
| long | helpers_ {0} |
| long | active_ {0} |
| std::size_t | generation_ {0} |
| bool | stop_ {false} |
Definition at line 44 of file ForEachImage.h.
|
delete |
|
inline |
Definition at line 54 of file ForEachImage.h.
|
inlineprivate |
Definition at line 111 of file ForEachImage.h.
|
inlineprivate |
Definition at line 136 of file ForEachImage.h.
|
inline |
Definition at line 98 of file ForEachImage.h.
|
inlinestatic |
Definition at line 46 of file ForEachImage.h.
|
inlineprivate |
Definition at line 148 of file ForEachImage.h.
|
inline |
Definition at line 66 of file ForEachImage.h.
|
inlinestaticprivate |
Definition at line 122 of file ForEachImage.h.
|
inlinenodiscardnoexcept |
Definition at line 94 of file ForEachImage.h.
|
private |
Definition at line 179 of file ForEachImage.h.
|
private |
Definition at line 173 of file ForEachImage.h.
|
private |
Definition at line 177 of file ForEachImage.h.
|
private |
Definition at line 180 of file ForEachImage.h.
|
private |
Definition at line 178 of file ForEachImage.h.
|
private |
Definition at line 171 of file ForEachImage.h.
|
private |
Definition at line 175 of file ForEachImage.h.
|
private |
Definition at line 176 of file ForEachImage.h.
|
private |
Definition at line 170 of file ForEachImage.h.
|
private |
Definition at line 181 of file ForEachImage.h.
|
private |
Definition at line 169 of file ForEachImage.h.
|
private |
Definition at line 172 of file ForEachImage.h.
|
private |
Definition at line 174 of file ForEachImage.h.