Included the listener thread and main thread.