Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SIGINT (or some other) handler must wait for last request to complete #77

Closed
temoto opened this issue May 29, 2014 · 1 comment
Closed
Labels

Comments

@temoto
Copy link
Contributor

temoto commented May 29, 2014

ev_signal_on_sigint(struct ev_loop* mainloop, ev_signal* watcher, const int events)

ev_signal_on_sigint(struct ev_loop* mainloop, ev_signal* watcher, const int events)
{
  /* Clean up and shut down this thread.
   * (Shuts down the Python interpreter if this is the main thread) */
  ev_unloop(mainloop, EVUNLOOP_ALL);
  PyErr_SetInterrupt();
}

This code bluntly interrupts request in processing. What is needed for graceful stop is ability to wait for current request to complete and only then raise exception or exit process.

@jonashaag
Copy link
Owner

agreed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants