-
- struct Level {
- Level (float a) : allocation (a), normalised (0) {}
-
- float allocation;
- float normalised;
- };
-
- std::list<Level> _stack;
-
- /** true if this job's progress will always be unknown */
- bool _progress_unknown;
-
- float _last_set;
-
- int _ran_for;
+ boost::optional<float> _progress;
+ boost::optional<struct timeval> _last_progress_update;
+
+ /** true to limit emissions of the progress signal so that they don't
+ * come too often.
+ */
+ boost::atomic<bool> _rate_limit_progress;
+
+ /** condition to signal changes to pause/resume so that we know when to wake;
+ this could be a general _state_change if it made more sense.
+ */
+ boost::condition_variable _pause_changed;