Click here to Skip to main content
15,890,399 members
Home / Discussions / C#
   

C#

 
QuestionRegex - Regular Expression Question Pin
Burak Uytun2-Aug-13 4:08
Burak Uytun2-Aug-13 4:08 
AnswerRe: Regex - Regular Expression Question Pin
PIEBALDconsult2-Aug-13 4:12
mvePIEBALDconsult2-Aug-13 4:12 
Questionc# projects Pin
Member 101854382-Aug-13 3:43
Member 101854382-Aug-13 3:43 
AnswerRe: c# projects Pin
Dave Kreskowiak2-Aug-13 4:00
mveDave Kreskowiak2-Aug-13 4:00 
GeneralRe: c# projects Pin
OriginalGriff2-Aug-13 4:28
mveOriginalGriff2-Aug-13 4:28 
GeneralRe: c# projects Pin
Dave Kreskowiak2-Aug-13 4:42
mveDave Kreskowiak2-Aug-13 4:42 
GeneralRe: c# projects Pin
OriginalGriff2-Aug-13 4:51
mveOriginalGriff2-Aug-13 4:51 
GeneralRe: c# projects Pin
Dave Kreskowiak2-Aug-13 6:31
mveDave Kreskowiak2-Aug-13 6:31 
AnswerRe: c# projects Pin
madhubsu@gmail.com5-Aug-13 2:13
madhubsu@gmail.com5-Aug-13 2:13 
QuestionFill DataGridView In Visual Studio 2010 Pin
sanket1641-Aug-13 21:38
sanket1641-Aug-13 21:38 
AnswerRe: Fill DataGridView In Visual Studio 2010 Pin
Eddy Vluggen2-Aug-13 0:33
professionalEddy Vluggen2-Aug-13 0:33 
AnswerRe: Fill DataGridView In Visual Studio 2010 Pin
Dave Kreskowiak2-Aug-13 2:31
mveDave Kreskowiak2-Aug-13 2:31 
AnswerRe: Fill DataGridView In Visual Studio 2010 Pin
madhubsu@gmail.com5-Aug-13 2:17
madhubsu@gmail.com5-Aug-13 2:17 
Questioncomputerized system of checking a multiple choice question exam using c# Pin
xtin901-Aug-13 17:59
xtin901-Aug-13 17:59 
AnswerRe: computerized system of checking a multiple choice question exam using c# Pin
Richard Andrew x641-Aug-13 18:19
professionalRichard Andrew x641-Aug-13 18:19 
GeneralRe: computerized system of checking a multiple choice question exam using c# Pin
xtin901-Aug-13 18:54
xtin901-Aug-13 18:54 
GeneralRe: computerized system of checking a multiple choice question exam using c# Pin
Dave Kreskowiak2-Aug-13 2:27
mveDave Kreskowiak2-Aug-13 2:27 
GeneralRe: computerized system of checking a multiple choice question exam using c# Pin
xtin902-Aug-13 4:27
xtin902-Aug-13 4:27 
GeneralRe: computerized system of checking a multiple choice question exam using c# Pin
Dave Kreskowiak2-Aug-13 4:48
mveDave Kreskowiak2-Aug-13 4:48 
QuestionMulti-threaded Task stops after 150 tasks Pin
MAW301-Aug-13 14:50
MAW301-Aug-13 14:50 
I used the following code for multi-threading, The code works fine but much slower if I add the tasks[nData].wait() command see below "*****" but if I remove the tasks[nData].wait() command then the code generates all the task but only gathers information for approximately 150 task then stops. Can anyone tell me why this is happening and what I can do to correct this problem.

Any help will be greatly appreciated.
Michael



public Boolean LoadData()
        {
            Boolean bComplete = false;
            Int32 nTotalData = 10000;
            this.tasks = new Task[nTotalData];
            DateTime dtStartTime = DateTime.Now;

            ProcessingBarsCS.StartTime();
            var parent = Task.Factory.StartNew(() =>
            {
                dtStartTime = DateTime.Now;

                for (Int32 nData = 0; nData < nTotalSymbols; nData++)
                {
                    bComplete = GetData_Task(nData, dtStartTime, nTotalData);
                }
            });
            parent.Wait();
            ProcessingBarsCS.StopTime();

            return bComplete;
        }

        Boolean GetData_Task(Int32 nData, DateTime  dtStartTime, Int32 nTotalData)
        {
            DataCS dataCS = new DataCS();
            tasks[nData] = Task.Factory.StartNew(() =>
            {
                nData = dataCS.Data();
            })
                .ContinueWith(antecendent => ProcessingData(nData));

            // *****
            tasks[nData].Wait();

            // Wait for all task to finish calculations
            try
            {
                Task.WaitAll(tasks);
                SetData_ElapsedTime(dtStartTime, nTotalData);
            }
            catch { }

            return true;
        }

AnswerRe: Multi-threaded Task stops after 150 tasks Pin
walterhevedeich1-Aug-13 19:59
professionalwalterhevedeich1-Aug-13 19:59 
AnswerRe: Multi-threaded Task stops after 150 tasks Pin
Richard Deeming2-Aug-13 1:19
mveRichard Deeming2-Aug-13 1:19 
QuestionFileSyncProvider Exception sourceDirectory is write protected Pin
andre_muc1-Aug-13 9:27
andre_muc1-Aug-13 9:27 
QuestionWindows Service Pin
murugesan.ks1-Aug-13 7:55
murugesan.ks1-Aug-13 7:55 
AnswerRe: Windows Service Pin
Eddy Vluggen1-Aug-13 9:02
professionalEddy Vluggen1-Aug-13 9:02 

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.