Refactor EventHost
Fix a deadlock scenario