diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-11-12 22:09:48 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2023-11-20 01:04:56 +0100 |
| commit | 89a798dbc5f48fef0b53a5ec9bb21f669dc594dd (patch) | |
| tree | d19f2cbd88fa4bb23a3a18213f24cf06964e1b75 /src/lib/job.cc | |
| parent | 796ac1e76ff47b2e4dad2b3ef10458d8befac5d8 (diff) | |
FIXME: Improve progress reporting of digest calculations (might help with #2643).2643-progress
Diffstat (limited to 'src/lib/job.cc')
| -rw-r--r-- | src/lib/job.cc | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/job.cc b/src/lib/job.cc index 28bdde7fc..2a4c891ed 100644 --- a/src/lib/job.cc +++ b/src/lib/job.cc @@ -59,6 +59,7 @@ Job::Job (shared_ptr<const Film> film) , _state (NEW) , _sub_start_time (0) , _progress (0) + , _rate_limit_progress(true) { } @@ -432,7 +433,7 @@ Job::set_progress (float p, bool force) { check_for_interruption_or_pause (); - if (!force) { + if (!force && _rate_limit_progress) { /* Check for excessively frequent progress reporting */ boost::mutex::scoped_lock lm (_progress_mutex); struct timeval now; @@ -735,3 +736,11 @@ Job::set_message (string m) boost::mutex::scoped_lock lm (_state_mutex); _message = m; } + + +void +Job::set_rate_limit_progress(bool rate_limit) +{ + _rate_limit_progress = rate_limit; +} + |
