Wrap the poller in a mutex