New barrier_wait algorythm implemented.