From: Ralph Boehme Date: Sun, 23 Dec 2018 08:44:22 +0000 (+0100) Subject: Revert "pthreadpool: add a comment about a further optimization in pthreadpool_tevent... X-Git-Tag: talloc-2.1.15~183 X-Git-Url: http://git.samba.org/?p=samba.git;a=commitdiff_plain;h=42e2ab7e9973e271cd7df4a1a22feaac1b8c0fd7 Revert "pthreadpool: add a comment about a further optimization in pthreadpool_tevent_job_destructor()" 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 Reviewed-by: Volker Lendecke Reviewed-by: Stefan Metzmacher --- diff --git a/lib/pthreadpool/pthreadpool_tevent.c b/lib/pthreadpool/pthreadpool_tevent.c index 5ccff6231f0..a0e146b5467 100644 --- a/lib/pthreadpool/pthreadpool_tevent.c +++ b/lib/pthreadpool/pthreadpool_tevent.c @@ -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