irmen / Pyro4

Pyro 4.x - Python remote objects
http://pyro4.readthedocs.io/
MIT License
715 stars 83 forks source link

Enh: select for accept socket readyness instead of block #214

Closed gst closed 5 years ago

gst commented 5 years ago

Python under wine doesn't seem to handle properly SIGINT.

This allow the server to be interrupted (with SIGINT) when running with wine and python (3.6(.8)).

irmen commented 5 years ago

interesting, can you explain in a bit more detail what problem this solves? (also why are you running python in wine?)

gst commented 5 years ago

well.. it solves that otherwise the server is blocked in the accept system call and a SIGINT does not interrupt/unblock it. I guess you can reproduce it. ( we are using wine + Python to run under linux conveniently some software that use dll )

irmen commented 5 years ago

(you can always use ctrl+break to abort the program on Windows)

Anyway, Pyro uses the selectors module over plain select. See how multiplexserver.py does this. Can you rewrite this in similar fashion, and see if that still works for you? Also the 0.1 second timeout delay is a bit small, I think we should be using config.POLLTIMEOUT.

irmen commented 5 years ago

I've also added this change into Pyro5

gst commented 5 years ago

Thanks about this !

gst commented 5 years ago

Hi @irmen just to know when you plan to release this on pypi ? Thanks again. Regards, Grégory.

irmen commented 5 years ago

I don't have a particular release schedule. But I could decide on a new release soon if no other issues pop up in say the next week

Oh, there's #208 that I'm not yet sure of what to do with it