> My server is using threads and so sending a -INT or -QUIT doesn't
> gracefully stop everything.

For which os ?

On platforms implementing thread cancellation (Linux and FreeBSD works
well) you have gracefully reload/stop even in multithreading mode.

>
> Is there a standard way to run code when uwsgi is stopping?  Is there a
> decorator I'm missing, or a standard function I can add that I'm not
> finding in the docs?
>

it depends on the language you are using. Python atexit module is a common
approach, while uwsgi.atexit is language independent (not implemented
everywhere but can be fixed fast).

-- 
Roberto De Ioris
http://unbit.it
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi

Reply via email to