Demo the basic usage of wait and notify function.