I would like to give exclusive flag to one of the workers in a way that if it gets killed, some other worker picks up the flag (possibly without recurring timer involved).
Perhaps something along the lines,
Mojo::IOLoop->flock($fh, LOCK_EX, sub{
say "waiting was worthwhile, just got exclusive flag";
});
Please suggest plugin or perldoc reference to such functionality.
thanks in advance