Click here to Skip to main content
15,888,527 members
Home / Discussions / C#
   

C#

 
GeneralRe: Properties vs Methods Opinions sought Pin
jschell10-May-13 7:58
jschell10-May-13 7:58 
AnswerRe: Properties vs Methods Opinions sought Pin
jschell10-May-13 7:50
jschell10-May-13 7:50 
GeneralRe: Properties vs Methods Opinions sought Pin
Ennis Ray Lynch, Jr.10-May-13 8:41
Ennis Ray Lynch, Jr.10-May-13 8:41 
GeneralRe: Properties vs Methods Opinions sought Pin
jschell13-May-13 7:58
jschell13-May-13 7:58 
AnswerRe: Properties vs Methods Opinions sought Pin
PIEBALDconsult10-May-13 18:32
mvePIEBALDconsult10-May-13 18:32 
GeneralPracticing Code Logic Pin
N8tiv10-May-13 3:24
N8tiv10-May-13 3:24 
GeneralRe: Practicing Code Logic Pin
Richard MacCutchan10-May-13 3:48
mveRichard MacCutchan10-May-13 3:48 
Questionxmpp Pin
Member 1004242210-May-13 2:20
Member 1004242210-May-13 2:20 
AnswerRe: xmpp Pin
Pete O'Hanlon10-May-13 2:34
mvePete O'Hanlon10-May-13 2:34 
AnswerRe: xmpp Pin
Richard MacCutchan10-May-13 3:44
mveRichard MacCutchan10-May-13 3:44 
QuestionAbout xmpp n bosh server Pin
Member 1004242210-May-13 1:46
Member 1004242210-May-13 1:46 
AnswerRe: About xmpp n bosh server Pin
Pete O'Hanlon10-May-13 2:13
mvePete O'Hanlon10-May-13 2:13 
QuestionExport to PST Pin
JD869-May-13 14:29
JD869-May-13 14:29 
QuestionProper Use of a Semaphore Pin
Richard Andrew x649-May-13 14:14
professionalRichard Andrew x649-May-13 14:14 
AnswerRe: Proper Use of a Semaphore Pin
SledgeHammer019-May-13 17:05
SledgeHammer019-May-13 17:05 
GeneralRe: Proper Use of a Semaphore Pin
Richard Andrew x6410-May-13 6:10
professionalRichard Andrew x6410-May-13 6:10 
Questionhow do i display http fields Pin
mais irreem9-May-13 3:35
mais irreem9-May-13 3:35 
AnswerRe: how do i display http fields Pin
OriginalGriff9-May-13 3:54
mveOriginalGriff9-May-13 3:54 
QuestionHTML, RTF or WordML? Pin
Jassim Rahma8-May-13 23:47
Jassim Rahma8-May-13 23:47 
AnswerRe: HTML, RTF or WordML? Pin
Abhinav S9-May-13 0:33
Abhinav S9-May-13 0:33 
AnswerRe: HTML, RTF or WordML? Pin
Dave Kreskowiak9-May-13 1:40
mveDave Kreskowiak9-May-13 1:40 
QuestionLogin Form in Visual studio 2008 c# Pin
Akash Bharatvala8-May-13 23:18
Akash Bharatvala8-May-13 23:18 
AnswerRe: Login Form in Visual studio 2008 c# Pin
Abhinav S9-May-13 0:23
Abhinav S9-May-13 0:23 
AnswerRe: Login Form in Visual studio 2008 c# Pin
Bikash Prakash Dash12-May-13 21:48
Bikash Prakash Dash12-May-13 21:48 
QuestionPerformance issue using Multi threading in Net 3.5 Pin
KIDYA8-May-13 20:35
KIDYA8-May-13 20:35 
Hello All,

I'm using Dot Net 3.5 for performing tasks in parallel using below code but It's not showing expected performance i.e. if serial task takes 1 min then using multitasking/parallel tasking it will finish within 1 min or much less time but it takes same time.

Code Snippet:

C#
// Initialize the reset events to keep track of completed threads
               ManualResetEvent[] resetEvents = new ManualResetEvent[arrFileName.Count];

               // Launch each method in it's own thread
               for (int i = 0; i < arrFileName.Count; i++)
               {
                   resetEvents[i] = new ManualResetEvent(false);
                   ThreadPool.QueueUserWorkItem(new WaitCallback((object index) =>
                   {
                       int actionIndex = (int)index;

                       // Execute the method
                       ThreadExcecute(arrFileName[actionIndex]);

                       // Tell the calling thread that we're done
                       resetEvents[actionIndex].Set();
                   }), i);
               }

               // Wait for all threads to execute
               WaitHandle.WaitAll(resetEvents);


Any suggestion?

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.