ecore: fix count of objects in the Ecore_Thread trash.

SVN revision: 71550
This commit is contained in:
Cedric BAIL 2012-05-30 10:25:44 +00:00
parent 88c5f1df74
commit 3f662e32a7
1 changed files with 6 additions and 2 deletions

View File

@ -260,6 +260,7 @@ _ecore_thread_worker_free(Ecore_Pthread_Worker *worker)
if (_ecore_thread_worker_count > ((_ecore_thread_count_max + 1) * 16))
{
_ecore_thread_worker_count--;
free(worker);
return;
}
@ -566,8 +567,11 @@ _ecore_thread_worker_new(void)
result = eina_trash_pop(&_ecore_thread_worker_trash);
if (!result) result = calloc(1, sizeof(Ecore_Pthread_Worker));
else _ecore_thread_worker_count--;
if (!result)
{
result = calloc(1, sizeof(Ecore_Pthread_Worker));
_ecore_thread_worker_count++;
}
LKI(result->cancel_mutex);
LKI(result->mutex);