MT with semaphore