Implement simple communication with two thread.