简体   繁体   中英

Three different threads in sequence

I have three different threads; to connect to http, login and download files from server. Does anyone know how to put them together so that it will first go and connect, then login, later download files?

I know i can use _connectionThread.start(); in the constructor but it is not in order that i want. How do i do that?

Thank in advance.

Each of three operations is dependent on the previous operation ie (connect <- login <- download). Hence they have to be performed in series. So there is no need to do each of them in separate thread. As they are serial doing them in same thread will often give you better results.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM