tevent in multithreaded programs

Jeremy Allison jra at samba.org
Sat Jan 31 01:35:29 MST 2015


On Fri, Jan 30, 2015 at 03:38:50PM -0500, Jeff Layton wrote:
> 
> These should be pretty long running connections. I'm probably just
> falling prey to trying to overthink how to do this. :)
> 
> I think I may just go with doing the accept in the event handler, but
> still have the connected sockets dispatch their activity to the
> workqueue. That's certainly simpler for now, and we can switch to
> dispatching the accepts to the workqueue later if it turns out that
> it's needed.

Yes. That is a much simpler design. Simpler is better when
dealing with event/thread programming :-).

Remember, the premature optimization is the root of all evil :-).


More information about the samba-technical mailing list