I'm not sure whether I should be signalling inside or outside the mutex. Any thoughts?