ciosrv => added proper locking for cioloop::events