Jonas Haag
Jonas Haag
This seems to be possible to work around with periodically calling into https://docs.python.org/2/c-api/exceptions.html#c.PyErr_CheckSignals
That's correct, if it doesn't work like that then that's a separate issue.
I don't know, maybe the other way round (first check signals, then set interrupt), but in either case we'd have to make sure we hold the GIL
Can you guys try the https://github.com/jonashaag/bjoern/tree/signal-watcher branch
@bulletmark The patch in that branch should make this work. It simply checks every 100ms if there's a new signal in the Python signal queue and executes that Python signal...
I just released 3.0.0 with the approach taken in the signal-watcher branch. @bulletmark could you elaborate on what's better in the meinheld implementation for your use case?
> I use something like that internally. With a little bit of cleaning, I could propose this as a PR if your are interested. Definitely! Could also paste it here...
Stupid question, if I send sigterm/sigint to a Python program, it will raise KeyboardInterrupt, right? So shouldn't that be what happens when you try to interrupt bjoern as well?
From #145 So, here's how Gunicorn works: - SIGINT shuts everything down momentarily. - SIGTERM waits for all active connections to finish, with a timeout (30 secs by default). It...
I'm still not sure how to meet both the expectations of people thinking of bjoern as a "library" that doesn't fiddle with signal handling and people thinking of bjoern as...