--- wxPython-src-2.9.4.0/src/unix/threadpsx.cpp.orig 2013-04-18 02:08:21.999609705 +0200 +++ wxPython-src-2.9.4.0/src/unix/threadpsx.cpp 2013-04-18 02:10:15.696180346 +0200 @@ -1047,18 +1047,23 @@ bool wxThread::SetConcurrency(size_t level) { -#ifdef HAVE_THR_SETCONCURRENCY +#ifdef HAVE_PTHREAD_SET_CONCURRENCY + int rc = pthread_setconcurrency( level ); +#elif defined(HAVE_THR_SETCONCURRENCY) int rc = thr_setconcurrency(level); +#else // !HAVE_THR_SETCONCURRENCY + // ok only for the default value + int rc = level == 0 ? 0 : -1; +#endif // HAVE_THR_SETCONCURRENCY/!HAVE_THR_SETCONCURRENCY + if ( rc != 0 ) { - wxLogSysError(rc, _T("thr_setconcurrency() failed")); + wxLogSysError(rc, _("Failed to set thread concurrency level to %lu"), + static_cast(level)); + return false; } - return rc == 0; -#else // !HAVE_THR_SETCONCURRENCY - // ok only for the default value - return level == 0; -#endif // HAVE_THR_SETCONCURRENCY/!HAVE_THR_SETCONCURRENCY + return true; } // -----------------------------------------------------------------------------