Use loopLock to hold selector thread