fix small TSan complaint
fix race condition in initialization of queue
Merge pull request #3 from ashleyh/event-loop

Small threading fixes