thread: Test for pending cancellation requests before select()ing on OS X