add mutex and event handler example