Re: timers in threaded application

2017-01-14 Thread dieter
Skip Montanaro writes: > On Fri, Jan 13, 2017 at 3:23 AM, dieter wrote: > >> If what you want to timeout are not I/O operations, you can have a >> look at "threading.Timer". It uses a separate thread, lets it wait >> a specified time and then starts a specified function, unless >> "cancel"ed. >>

Re: timers in threaded application

2017-01-13 Thread Skip Montanaro
On Fri, Jan 13, 2017 at 3:23 AM, dieter wrote: > If what you want to timeout are not I/O operations, you can have a > look at "threading.Timer". It uses a separate thread, lets it wait > a specified time and then starts a specified function, unless > "cancel"ed. > Ooh, hadn't considered that. Th

Re: timers in threaded application

2017-01-13 Thread dieter
Skip Montanaro writes: > ... > I still need timers, and for the moment I'm stuck with this package's event > loop. What options do I have? If the activities are really run in separate threads (such that an event processing can take arbitrary time without much affecting the processing of other eve

timers in threaded application

2017-01-12 Thread Skip Montanaro
I know signals and threads are a bad mix, but I only discovered I was playing with fire a few minutes ago. I've been using the websocket-client library (https://pypi.python.org/pypi/websocket-client/) to interact with another system at work. It implements its own event loop, but doesn't seem to pla