Clean threading/Condition and Barrier + added SpinLock