Re: [Python-Dev] Interrupt thread.join() with Ctrl-C / KeyboardInterrupt on Windows

2017-08-08 Thread Jonathan Slenders
Thank you Nathaniel for the response! Really interesting and helpful. 2017-08-08 20:51 GMT+02:00 Nathaniel Smith : > On Tue, Aug 8, 2017 at 2:54 AM, Jonathan Slenders > wrote: > > Hi all, > > > > Is it possible that thread.join() cannot be interrupted on Windows,

[Python-Dev] Interrupt thread.join() with Ctrl-C / KeyboardInterrupt on Windows

2017-08-08 Thread Jonathan Slenders
Hi all, Is it possible that thread.join() cannot be interrupted on Windows, while it can be on Linux? Would this be a bug, or is it by design? import threading, time def wait(): time.sleep(1000) t = threading.Thread(target=wait) t.start() t.join() # Press Control-C now. It stops on Linux, w

Re: [Python-Dev] [Python-ideas] PEP 3156 - Asynchronous IO Support Rebooted

2012-12-21 Thread Jonathan Slenders
As far as I understand, "yield from" will always work, because a Future object can act like an iterator, and you can delegate your own generator to this iterator at the place of "yield from". "yield" only works if the parameter behind yield is already a Future object. Right Guido? In case of sleep