Brice F. ha scritto:
phase ends ?
directive of my module.
This is interesting, I may need this for mod_wsgi.
Your code in configuration callbacks will be inherited by all the worker
Yes, that’s why I said I fear there is a race if the timer is added
after the configuration takes place, like in my handler (there could be
a time frame between the moment I test the timer is not set and the moment
I add the timer).
I don’t think this is possible, since nginx does not uses preemption.
As an example you can use the init process callback in your ngx_module_t
Yes I’ve seen. I’ll try it to see if that works.
Is the init process callback called after the configuration takes place
and after ngx_event_tiner_init ?
It is called after configuration, and I think that it is called after
the event module has been initialized.
The other problem is that I need to get my module configuration in this
callback, which I’m not sure it is possible.
It should be possible with ngx_get_conf:
However keep in mind that you will have a timer for each worker process,
so the cleanup code will be executed n times, unless you use shared
memory to prevent it.
Regards Manlio P.