Synchronized execution executes a function or a static member function when a certain event happends.