Re: [Tutor] basic threading question

2016-01-07 Thread Alan Gauld
On 08/01/16 00:23, Alan Gauld wrote: > Just another thought. Have you looked at asyncore yet? It seems > ideally suited to your usecase and avoids all the threading > problems (or more accurately lets Python deal with it invisibly) OK, I just saw another message in another thread that says you ar

Re: [Tutor] basic threading question

2016-01-07 Thread Alan Gauld
On 07/01/16 19:26, richard kappler wrote: > The brief version, I am reading and parsing a data stream through a socket, > several actually. Each new connection spawns a thread that reads and > parses. Should the client close, I want the thread to terminate. Just another thought. Have you looked

Re: [Tutor] basic threading question

2016-01-07 Thread Cameron Simpson
On 07Jan2016 14:26, richard kappler wrote: See previous posts on 'looping generator' for details about the code and project. The brief version, I am reading and parsing a data stream through a socket, several actually. Each new connection spawns a thread that reads and parses. Should the client

Re: [Tutor] basic threading question

2016-01-07 Thread Alan Gauld
On 07/01/16 19:26, richard kappler wrote: > several actually. Each new connection spawns a thread that reads and > parses. First question. Do you need to read AND parse in the thread. Could you not read the raw data and send that to a parsing thread? Usually reading the data won't be a problem (