Welcome! Log In Create A New Profile

Advanced

Post an event to the event queue from another thread

Posted by Sogartar 
Post an event to the event queue from another thread
March 13, 2017 10:13AM
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?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 295
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready