|
stlab 2.3.0
Modern, modular C++ algorithms, data structures, and concurrency primitives
|
Tracks how many wrapped tasks are in flight and how many have completed. More...
#include <progress.hpp>
Public Member Functions | |
| progress_tracker (std::function< void(size_t, size_t)> f) | |
| Constructs a tracker that invokes f(steps(), completed()) when a wrapped task completes. | |
| progress_tracker (const progress_tracker &)=default | |
| progress_tracker & | operator= (const progress_tracker &)=default |
| progress_tracker (progress_tracker &&)=default | |
| progress_tracker & | operator= (progress_tracker &&)=default |
| template<typename F> | |
| auto | operator() (F &&f) |
| Returns a wrapper that counts this callable as one step until it returns. | |
| size_t | steps () const |
| Number of tasks currently registered (in flight or not yet done). | |
| size_t | completed () const |
| Number of wrapped tasks that have finished. | |
Tracks how many wrapped tasks are in flight and how many have completed.