discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=8d2f5d7a7d4774739775fcec05e0d489270b5c1e

commit 8d2f5d7a7d4774739775fcec05e0d489270b5c1e
Author: Mike Blumenkrantz <[email protected]>
Date:   Mon Jun 25 16:53:40 2018 -0400

    Revert "ecore/thread: track "no_queue" threads"
    
    This reverts commit 1e47db6a711a1f605bc765cb694d575af28ab85e.
    
    somehow arc managed to land an old revision of this which was not consistent
    with the final version of D6354
---
 src/lib/ecore/ecore_thread.c | 14 +++-----------
 1 file changed, 3 insertions(+), 11 deletions(-)

diff --git a/src/lib/ecore/ecore_thread.c b/src/lib/ecore/ecore_thread.c
index 97de931aea..c8f76139fd 100644
--- a/src/lib/ecore/ecore_thread.c
+++ b/src/lib/ecore/ecore_thread.c
@@ -460,13 +460,10 @@ _ecore_direct_worker_cleanup(void *data)
 
    DBG("cleanup work=%p, thread=%" PRIu64 " (should join)", work, 
(uint64_t)work->self);
 
-   SLKL(_ecore_pending_job_threads_mutex);
-   _ecore_thread_count--;
    ecore_main_loop_thread_safe_call_async(_ecore_thread_handler, work);
 
    ecore_main_loop_thread_safe_call_async((Ecore_Cb)_ecore_thread_join,
                                           (void *)(intptr_t)PHS());
-   SLKU(_ecore_pending_job_threads_mutex);
 }
 
 static void *
@@ -689,7 +686,7 @@ ecore_thread_run(Ecore_Thread_Cb func_blocking,
    SLKL(_ecore_pending_job_threads_mutex);
    _ecore_pending_job_threads = eina_list_append(_ecore_pending_job_threads, 
work);
 
-   if (_ecore_thread_count >= _ecore_thread_count_max)
+   if (_ecore_thread_count == _ecore_thread_count_max)
      {
         SLKU(_ecore_pending_job_threads_mutex);
         return (Ecore_Thread *)work;
@@ -950,12 +947,7 @@ ecore_thread_feedback_run(Ecore_Thread_Cb func_heavy,
 
 retry_direct:
         if (PHC(t, _ecore_direct_worker, worker))
-          {
-             SLKL(_ecore_pending_job_threads_mutex);
-             _ecore_thread_count++;
-             SLKU(_ecore_pending_job_threads_mutex);
-             return (Ecore_Thread *)worker;
-          }
+          return (Ecore_Thread *)worker;
         if (!tried)
           {
              _ecore_main_call_flush();
@@ -977,7 +969,7 @@ retry_direct:
    SLKL(_ecore_pending_job_threads_mutex);
    _ecore_pending_job_threads_feedback = 
eina_list_append(_ecore_pending_job_threads_feedback, worker);
 
-   if (_ecore_thread_count >= _ecore_thread_count_max)
+   if (_ecore_thread_count == _ecore_thread_count_max)
      {
         SLKU(_ecore_pending_job_threads_mutex);
         return (Ecore_Thread *)worker;

-- 


Reply via email to