First example for Thread synchronization.