diff options
| author | Carl Hetherington <cth@carlh.net> | 2023-07-09 23:22:20 +0200 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2024-01-28 02:01:57 +0100 |
| commit | 1184335ed2d76d12eaf7ff8c7e61568fa9e69568 (patch) | |
| tree | e0222139d90e147a182951ba4b5b6775f804c457 /src/lib | |
| parent | 305f0b5201b3e968f34c2780b43b8227b3559e7f (diff) | |
Cleanup: white space tidying.
Diffstat (limited to 'src/lib')
| -rw-r--r-- | src/lib/j2k_encoder.cc | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/src/lib/j2k_encoder.cc b/src/lib/j2k_encoder.cc index 0b0cadfeb..4e4759bc6 100644 --- a/src/lib/j2k_encoder.cc +++ b/src/lib/j2k_encoder.cc @@ -129,11 +129,11 @@ J2KEncoder::end() LOG_GENERAL (N_("Clearing queue of %1"), _queue.size ()); /* Keep waking workers until the queue is empty */ - while (!_queue.empty ()) { - rethrow (); - _empty_condition.notify_all (); - _full_condition.wait (lock); - } + while (!_queue.empty ()) { + rethrow (); + _empty_condition.notify_all (); + _full_condition.wait (lock); + } lock.unlock (); LOG_GENERAL_NC (N_("Terminating encoder threads")); @@ -149,12 +149,12 @@ J2KEncoder::end() LOG_GENERAL (N_("Mopping up %1"), _queue.size()); /* The following sequence of events can occur in the above code: - 1. a remote worker takes the last image off the queue - 2. the loop above terminates - 3. the remote worker fails to encode the image and puts it back on the queue - 4. the remote worker is then terminated by terminate_threads + 1. a remote worker takes the last image off the queue + 2. the loop above terminates + 3. the remote worker fails to encode the image and puts it back on the queue + 4. the remote worker is then terminated by terminate_threads - So just mop up anything left in the queue here. + So just mop up anything left in the queue here. */ for (auto & i: _queue) { if (Config::instance()->enable_gpu ()) { @@ -389,7 +389,6 @@ try LOG_GENERAL (N_("[%1] J2KEncoder thread pushes frame %2 back onto queue after failure"), thread_id(), vf.index()); _queue.push_front (vf); } - } else { try { LOG_TIMING ("start-local-encode thread=%1 frame=%2", thread_id(), vf.index()); |
