use member eventMap variable
Add thread initialization