proxygen
|
#include <CobHelper.h>
Public Member Functions | |
CobHelper (size_t itemsLeft, const std::function< void()> &cob, const std::function< void(const std::exception &)> &ecob) | |
void | setError (const std::string &emsg) |
void | workerDone () |
Private Member Functions | |
void | allDone () |
Private Attributes | |
std::atomic< uint32_t > | itemsLeft_ |
std::string | emsg_ |
std::function< void()> | cob_ |
std::function< void(const std::exception &)> | ecob_ |
A helper class to schedule N async jobs in (possibly) different threads and invoke a final callback in a given thread once all are done.
Definition at line 21 of file CobHelper.h.
|
inline |
Definition at line 23 of file CobHelper.h.
|
inlineprivate |
Definition at line 44 of file CobHelper.h.
References cob_, ecob_, and emsg_.
Referenced by workerDone().
|
inline |
|
inline |
|
private |
Definition at line 56 of file CobHelper.h.
Referenced by allDone().
|
private |
Definition at line 57 of file CobHelper.h.
Referenced by allDone().
|
private |
Definition at line 55 of file CobHelper.h.
Referenced by allDone(), and setError().
|
private |
Definition at line 54 of file CobHelper.h.
Referenced by workerDone().