Very small, but, https://docs.python.org/2/howto/sockets.htmlhttps://docs.python.org/3/howto/sockets.html have : while True: # accept connections from outside (clientsocket, address) = serversocket.accept() # now do something with the clientsocket # in this case, we'll pretend this is a threaded server ct = client_thread(clientsocket) ct.run() and for some reason I really want it to be ct.start()
Based on the paragraph following the example, I don't think client_thread is a threading.Thread, and 'run' is meant to be a generic representation of a possible API. Since Threads do have a 'run' method, this is certainly potentially confusing. Maybe we should change it to 'start_thread' or something like that?
I could definitely understand that. After all, if it's slightly askew (or strikes some as such) it forces critical thinking, which is good. I didn't think calling run() was indicative of the three likely pathways to handle the client socket in the following paragraph. I'm indifferent, I just saw something so I said something, but ultimately I think you guys do a tremendous job keeping this documentation good. Thanks, On Fri, Oct 6, 2017 at 10:44 AM, R. David Murray <report@bugs.python.org> wrote: > > R. David Murray <rdmurray@bitdance.com> added the comment: > > Or maybe instead of client_handler/run, it should be something like > handle_client_asynchronously(clientsocket). > > ---------- > > _______________________________________ > Python tracker <report@bugs.python.org> > <https://bugs.python.org/issue31717> > _______________________________________ >