• Post Reply Bookmark Topic Watch Topic
  • New Topic

download multiple files  RSS feed

 
Maged Roshdy
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all
in a a file sharing program , i want to downlaod
somefiles at the same time so i wrote in the Listener's of the downlaod Button .
new Downlaod(some params).start();
to start a new thread with every new file to download , but the result is not what i expected
the result is that every time i start new thread
the previus one stoped.
could anyone hlep my
thanks
 
Stan James
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd guess you have a collision with all the threads trying to use the same resource. When a new thread grabs the resource, the prior thread fais. Maybe a socket?
 
Jim Yingst
Wanderer
Sheriff
Posts: 18671
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
the result is that every time i start new thread
the previus one stoped.

How exactly does it stop? Is the thread still alive? Did it throw an exception? Waiting to enter a synchronized block somewhere? Try putting some logging statements into the thread's code, so that you have more information about exactly where it is and what it's doing. If you still can't figure it out, try posting some of the code here - specifically, the code that downloads a single file.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!