Click here to Skip to main content
15,902,854 members
Home / Discussions / C#
   

C#

 
GeneralRe: string.Empty Vs "" Pin
Pete O'Hanlon27-Jun-08 1:53
mvePete O'Hanlon27-Jun-08 1:53 
GeneralRe: string.Empty Vs "" Pin
Mark Churchill27-Jun-08 16:39
Mark Churchill27-Jun-08 16:39 
AnswerRe: string.Empty Vs "" Pin
Jamal Mavadat27-Jun-08 5:34
Jamal Mavadat27-Jun-08 5:34 
Questionscalar variable Pin
j_tush26-Jun-08 23:52
j_tush26-Jun-08 23:52 
AnswerRe: scalar variable Pin
Christian Graus27-Jun-08 0:25
protectorChristian Graus27-Jun-08 0:25 
QuestionNeed help with an regular expression Pin
Paw Jershauge26-Jun-08 23:43
Paw Jershauge26-Jun-08 23:43 
AnswerRe: Need help with an regular expression Pin
Vimalsoft(Pty) Ltd27-Jun-08 0:59
professionalVimalsoft(Pty) Ltd27-Jun-08 0:59 
GeneralRe: Need help with an regular expression Pin
Paw Jershauge27-Jun-08 1:07
Paw Jershauge27-Jun-08 1:07 
AnswerRe: Need help with an regular expression Pin
Paw Jershauge27-Jun-08 1:58
Paw Jershauge27-Jun-08 1:58 
AnswerRe: Need help with an regular expression Pin
User 665827-Jun-08 4:19
User 665827-Jun-08 4:19 
GeneralRe: Need help with an regular expression Pin
Paw Jershauge28-Jun-08 3:22
Paw Jershauge28-Jun-08 3:22 
GeneralRe: Need help with an regular expression Pin
User 665828-Jun-08 3:31
User 665828-Jun-08 3:31 
GeneralRe: Need help with an regular expression Pin
Paw Jershauge30-Jun-08 8:47
Paw Jershauge30-Jun-08 8:47 
Questionarray string using dynamically Pin
maruthi26-Jun-08 23:24
maruthi26-Jun-08 23:24 
AnswerRe: array string using dynamically Pin
Guffa26-Jun-08 23:36
Guffa26-Jun-08 23:36 
GeneralRe: array string using dynamically Pin
maruthi26-Jun-08 23:56
maruthi26-Jun-08 23:56 
AnswerRe: array string using dynamically Pin
dan!sh 26-Jun-08 23:38
professional dan!sh 26-Jun-08 23:38 
QuestionAsynchronous processing - More number of processes are not running parallel Pin
N a v a n e e t h26-Jun-08 23:23
N a v a n e e t h26-Jun-08 23:23 
I am on a multi threaded application which is a file downloader from FTP server. I have created a producer/consumer style custom class which manages a download queue and processes the items one by one in the queue. I am adding delegate instances to the queue and when one thread picks the item, it invokes the delegate instance to start the work.

For downloading files from FTP, I used WebClient classes DownloadFileAsync. My custom class wraps webclient and it's events. I have noticed this is downloading only 2 files at a time. All the other requests are queued and will be executed one by one.

My "DownloadQueue" class is working well. It creates the specified number of threads and dequeues each item when threads become free. I found problem is in DownloadFileAsync method of WebClient. It uses asynchronous fashion and obviously using a thread pool thread to download the file. I learned that, thread pool creates only 2 threads by default and all the other requests will be queued until threads become free. I tried increasing the thread count by ThreadPool.SetMinThread(), but it didn't worked. Still it's downloading only two files at a time.

I am sure I have called DownloadFileAsync 5 times from 5 threads. 2 of them started immediately and remaining 3 gets queued. Any idea to solve this issue ?

All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia

How to use google | Ask smart questions

AnswerRe: Asynchronous processing - More number of processes are not running parallel Pin
leppie27-Jun-08 3:43
leppie27-Jun-08 3:43 
GeneralRe: Asynchronous processing - More number of processes are not running parallel Pin
N a v a n e e t h27-Jun-08 20:38
N a v a n e e t h27-Jun-08 20:38 
GeneralRe: Asynchronous processing - More number of processes are not running parallel Pin
leppie27-Jun-08 23:56
leppie27-Jun-08 23:56 
GeneralRe: Asynchronous processing - More number of processes are not running parallel Pin
N a v a n e e t h28-Jun-08 5:02
N a v a n e e t h28-Jun-08 5:02 
AnswerRe: Asynchronous processing - More number of processes are not running parallel Pin
S. Senthil Kumar27-Jun-08 4:17
S. Senthil Kumar27-Jun-08 4:17 
GeneralRe: Asynchronous processing - More number of processes are not running parallel Pin
N a v a n e e t h27-Jun-08 20:34
N a v a n e e t h27-Jun-08 20:34 
QuestionAccessing data in Excel 4.0 Pin
kbalias26-Jun-08 22:49
kbalias26-Jun-08 22:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.