[PATCH] tevent and threads - infrastructure improvements - version #2

Jeremy Allison jra at samba.org
Tue Sep 15 16:59:04 UTC 2015

On Tue, Sep 15, 2015 at 06:32:55PM +0200, Ralph Böhme wrote:
> The called thread would call tevent_thread_proxy_schedule() to send
> the reply, locking an already destroyed mutex which is undefined
> behaviour. Can we add some documentation that freeing proxy objects
> with in flight operations should be avoided or similar?

Oh - looking at the existing docs I already kind of did... :-).


This function causes the function <code>handler()</code>
to be invoked as a tevent_immediate callback from the event loop
of the thread that created the struct tevent_thread_proxy *
(so the owning <code>struct tevent_context *</code> should be
long-lived and not in the process of being torn down).

I'll make it clearer :-).

More information about the samba-technical mailing list