ecore/thread: flush main loop threads while waiting during shutdown

if a thread is actively waiting on the main loop in order to proceed
with its exit, a flush here avoids the case where the thread waits
until the main loop has exited

Differential Revision: https://phab.enlightenment.org/D6437
This commit is contained in:
Mike Blumenkrantz 2018-06-26 16:35:55 -04:00 committed by Marcel Hollerbach
parent 2ee83cc28d
commit 04d209e238
1 changed files with 5 additions and 1 deletions

View File

@ -627,7 +627,11 @@ _ecore_thread_shutdown(void)
}
SLKU(_ecore_pending_job_threads_mutex);
iteration++;
if (test) usleep(1000);
if (test)
{
_ecore_main_call_flush();
usleep(1000);
}
} while (test == EINA_TRUE && iteration < 50);
if (iteration == 20 && _ecore_thread_count > 0)