Master process split: globally synchronized timers
This merge request is the next phase of splitting master into multiple processes.
It contains global synchronization of timers (across all workers). It adds new method global_timer
to timers. It sends request to master, which sets timer internally. When it expires, the master sends notification to all workers (that asked for that timer) and they then perform the requested callback.
global_timer
is meant to be replacement for timer
, any local timer in worked could be turned into globally synchronized just by changing the called method name (edit: and adding callback name, which has to be unique).
I changed the timer type in some plugins (where I thought it's necessary), more local timers could be easily turn into globally synchronized if it's needed.
After accepting this merge request, the multi-process master should be ready to use (edit: well, not quite, there are problems with coordinating batches, especially for sniff plugin). The spoof plugin was disabled for now (just commented out in the config file, this change is also included here). Reminds me that unknown plugins are now ingnored (this change was already included in the first MR for multi-process), that would solve -don'tcloseitplease- #54 (closed).
This work is related to #47 (closed) and #42 (closed).