Hi ...
I have been looking into the documentation for more hints on the threads
part of uwsgi. I am planning on creating a C++ plugin for uwsgi and like
to know a little about how this will work while using the thread model.
I really like the idea of not reinventing all the inner work of uwsgi (I
have done that before, but uwsgi have done a much better job) :-)
I off cause need :
enable-threads
And I guess that this means that plugin will be loaded and I quess that
the "init" function will be executed ones (in the same startup thread as
when loading the plugin) ?
All following requests are send using a thread per request, and I quess
they are all there are in a pool of threads defined by :
threads=nn
there are four stack size config entries ?
thread-stacksize
threads-stacksize
thread-stack-size
threads-stack-size
Do they all do the same ?
If this is the case, then all common resources between each request need
mutex locks to make sure all will work, and all data allocated on plugin
load/init will be initialized single time at startup.
If I don't use the thread model, the init function will be called ones
per spawn, and requests are in the same "thread" context as the init
function ?
Does this sound like uWSGI and its plugin lives circle ?
/BL
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi