eina: check pending lock at the right time.

SVN revision: 59286
This commit is contained in:
Cedric BAIL 2011-05-09 10:29:55 +00:00
parent 811fde2504
commit 83c3a1a0fb
1 changed files with 6 additions and 5 deletions

View File

@ -283,7 +283,13 @@ eina_threads_shutdown(void)
assert(pthread_equal(_eina_main_loop, pthread_self()));
assert(_eina_main_thread_count > 0);
#endif
ret = --_eina_main_thread_count;
if(_eina_main_thread_count > 0)
return ret;
#ifdef EINA_HAVE_DEBUG_THREADS
pthread_mutex_lock(&_eina_tracking_lock);
if (_eina_tracking)
{
@ -297,13 +303,8 @@ eina_threads_shutdown(void)
abort();
}
pthread_mutex_unlock(&_eina_tracking_lock);
#endif
ret = --_eina_main_thread_count;
if(_eina_main_thread_count > 0)
return ret;
eina_share_common_threads_shutdown();
eina_log_threads_shutdown();