Update code documentation to explain potential OSError on semaphore acquire