> Hi Roberto
>
> How do you think is there another way to run parralel code thread (real
> thread without GIL =).  ) from uWSGI thread and complete uWSGI
> application.
>
> Thanks,
> Andrey


Most of the time, i prefer using the Spooler for this kind o jobs.
I do not want to have hundreds of processes spawned by requests, so i
prefer to put them in a runqueue.

If this is not an issue for you, you can use the "grunt" mode.

Simply add --grunt to command line, and in your code:

if uwsgi.grunt():
    # now i am a grunt process
    # detach client
    uwsgi.disconnect()
    # do the job
    code
    code
    code
    ...
else:
    # i am still the original request
    # return data and end the request
    return "<h1>Done</h1>"


uwsgi.grunt() is pratically a simplified unix fork()

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

Reply via email to