semaphore, Thread Safety and QObjects