Thread about Threads

oliverg

Active member
Joined
Apr 14, 2010
Messages
37
Programming Experience
1-3
I'm just wondering here...

I just made a rapid file transfer form for my photos. In which I drag photos into a listview with my destination folder set.

I assign each individual file transfer to a new thread. This works very fast as compared to the standard drag n' drop.

I was wondering if anyone knew of any adverse implications of doing this? Before I start using it. I have had a browse around, and I can't think of any problems.
 
If you end up creating too many threads explicitly you may actually hamper performance. You may be best to use the ThreadPool and let the system manage the number of concurrent threads. If there's only a few concurrent tasks then it's probably not a big deal but as the number rises it might be beneficial.
 
Hi,

Thanks for this, I haven't used thread pools before, but I just had a read and I can't implement .Join() to my thread.

I read that the thread pool default max threads was 250, so if I have a variable to limit this being exceeded with my current method, I'm guessing this would be ok...

I'll look into thread pooling further I think.

Cheers.
 
Back
Top