Merge branch 'dev' into spot-removal-tool

This commit is contained in:
Hombre57
2017-08-20 21:06:09 +02:00
566 changed files with 47792 additions and 35293 deletions

View File

@@ -68,11 +68,8 @@ public:
inactive_waiting_(false)
{
int threadCount = 1;
#if !(__GNUC__ == 4 && __GNUC_MINOR__ == 8 && defined( WIN32 ) && defined(__x86_64__))
// See Issue 2431 for explanation
#ifdef _OPENMP
threadCount = omp_get_num_procs();
#endif
#endif
threadPool_ = new Glib::ThreadPool(threadCount, 0);
@@ -81,12 +78,8 @@ public:
Glib::ThreadPool* threadPool_;
// Need to be a Glib::Threads::Mutex because used in a Glib::Threads::Cond object...
// This is the only exceptions in RT so far, MyMutex is used everywhere else
#ifdef WIN32
Glib::Mutex mutex_;
#else
// This is the only exceptions along with GThreadMutex (guiutils.cc), MyMutex is used everywhere else
Glib::Threads::Mutex mutex_;
#endif
JobList jobs_;
@@ -94,11 +87,7 @@ public:
bool inactive_waiting_;
#ifdef WIN32
Glib::Cond inactive_;
#else
Glib::Threads::Cond inactive_;
#endif
void
processNextJob()
@@ -106,11 +95,7 @@ public:
Job j;
{
#ifdef WIN32
Glib::Mutex::Lock lock(mutex_);
#else
Glib::Threads::Mutex::Lock lock(mutex_);
#endif
// nothing to do; could be jobs have been removed
if ( jobs_.empty() ) {
@@ -173,12 +158,7 @@ public:
}
{
#ifdef WIN32
Glib::Mutex::Lock lock(mutex_);
#else
Glib::Threads::Mutex::Lock lock(mutex_);
#endif
if ( --active_ == 0 &&
inactive_waiting_ ) {
@@ -209,11 +189,7 @@ ThumbImageUpdater::add(ThumbBrowserEntryBase* tbe, bool* priority, bool upgrade,
return;
}
#ifdef WIN32
Glib::Mutex::Lock lock(impl_->mutex_);
#else
Glib::Threads::Mutex::Lock lock(impl_->mutex_);
#endif
// look up if an older version is in the queue
Impl::JobList::iterator i(impl_->jobs_.begin());
@@ -245,11 +221,7 @@ ThumbImageUpdater::removeJobs(ThumbImageUpdateListener* listener)
{
DEBUG("removeJobs(%p)", listener);
#ifdef WIN32
Glib::Mutex::Lock lock(impl_->mutex_);
#else
Glib::Threads::Mutex::Lock lock(impl_->mutex_);
#endif
for( Impl::JobList::iterator i(impl_->jobs_.begin()); i != impl_->jobs_.end(); ) {
if (i->listener_ == listener) {
@@ -276,11 +248,7 @@ ThumbImageUpdater::removeAllJobs()
{
DEBUG("stop");
#ifdef WIN32
Glib::Mutex::Lock lock(impl_->mutex_);
#else
Glib::Threads::Mutex::Lock lock(impl_->mutex_);
#endif
impl_->jobs_.clear();