diff options
| author | Carl Hetherington <cth@carlh.net> | 2015-12-09 15:16:16 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2015-12-09 15:16:16 +0000 |
| commit | fccc63ca722e8156843ecbe2063cb5c3ea6f5ceb (patch) | |
| tree | a6c9e04e438d6a3a8420d2ad57cd58cb28e40807 /src | |
| parent | 01d0c14f03698d25af51f7d1a1b3112958da1cf3 (diff) | |
More debugging.
Diffstat (limited to 'src')
| -rw-r--r-- | src/lib/encoder.cc | 4 | ||||
| -rw-r--r-- | src/lib/job.cc | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/src/lib/encoder.cc b/src/lib/encoder.cc index 00d6e6399..e7277d0dd 100644 --- a/src/lib/encoder.cc +++ b/src/lib/encoder.cc @@ -260,12 +260,16 @@ Encoder::terminate_threads () boost::mutex::scoped_lock threads_lock (_threads_mutex); + int n = 0; for (list<boost::thread *>::iterator i = _threads.begin(); i != _threads.end(); ++i) { + LOG_GENERAL ("Terminating thread %1 of %2", n + 1, _threads.size ()); (*i)->interrupt (); if ((*i)->joinable ()) { (*i)->join (); } delete *i; + LOG_GENERAL_NC ("Thread terminated"); + ++n; } _threads.clear (); diff --git a/src/lib/job.cc b/src/lib/job.cc index 35f583408..6ba6a3e1a 100644 --- a/src/lib/job.cc +++ b/src/lib/job.cc @@ -43,6 +43,7 @@ using boost::optional; using boost::function; #define LOG_ERROR_NC(...) _film->log()->log (__VA_ARGS__, LogEntry::TYPE_ERROR); +#define LOG_GENERAL(...) _film->log()->log (String::compose (__VA_ARGS__), LogEntry::TYPE_GENERAL); /** @param film Associated film, or 0 */ Job::Job (shared_ptr<const Film> film) @@ -295,6 +296,7 @@ Job::sub (string n) { { boost::mutex::scoped_lock lm (_progress_mutex); + LOG_GENERAL ("Sub-job %1 starting", n); _sub_name = n; } |
