Thread synchronization problem test. (edited on web)