Revert "pthreadpool: add a comment about a further optimization in pthreadpool_tevent...
authorRalph Boehme <slow@samba.org>
Sun, 23 Dec 2018 08:44:22 +0000 (09:44 +0100)
committerStefan Metzmacher <metze@samba.org>
Fri, 11 Jan 2019 22:11:14 +0000 (23:11 +0100)
This reverts commit f23cac39b36b026650e0922c78fe0fd3fe567e35.

See the discussion in

https://lists.samba.org/archive/samba-technical/2018-December/131731.html

for the reasoning behind this revert.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
lib/pthreadpool/pthreadpool_tevent.c

index 5ccff62..a0e146b 100644 (file)
@@ -492,23 +492,6 @@ static int pthreadpool_tevent_job_destructor(struct pthreadpool_tevent_job *job)
                TALLOC_FREE(job->im);
        }
 
-       /*
-        * TODO?: We could further improve this by adjusting
-        * tevent_threaded_schedule_immediate_destructor()
-        * and allow TALLOC_FREE() during its time
-        * in the main_ev->scheduled_immediates list.
-        *
-        * PTHREAD_TEVENT_JOB_THREAD_FENCE(job);
-        * if (state->needs_fence.signaled) {
-        *       *
-        *       * The signal function is completed
-        *       * in future we may be allowed
-        *       * to call TALLOC_FREE(job->im).
-        *       *
-        *      TALLOC_FREE(job->im);
-        * }
-        */
-
        /*
         * pthreadpool_tevent_job_orphan() already removed
         * it from pool->jobs. And we don't need try