back to implementation with semaphores + cleaning of implementation of shutdown test case