Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

Post an event to the event queue from another thread

$
0
0
I am writing a native module.
Is it possible to post events to the event queue in a thread safe way? It looks like the ngx_post_event function is not thread safe. ngx_add_timer seems also not to be thread safe.

Is the best approach to handle concurrency myself, schedule an event with ngx_add_timer from the event handling thread and check each time if the work is done in the event handler?

Viewing all articles
Browse latest Browse all 4759

Trending Articles