开发者

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 i.e. (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.


I have explained it here- http://prasanta-paul.blogspot.com/2011/06/multi-threaded-execution-control.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜