Click here to Skip to main content
15,908,115 members
Home / Discussions / C#
   

C#

 
GeneralRe: Pop Up Menu Pin
hiremath7122-Feb-07 0:40
hiremath7122-Feb-07 0:40 
Questionhi!! [modified] Pin
Nekshan21-Feb-07 0:17
Nekshan21-Feb-07 0:17 
AnswerRe: hi!! Pin
virendra patel21-Feb-07 0:22
virendra patel21-Feb-07 0:22 
GeneralRe: hi!! Pin
Nekshan21-Feb-07 0:35
Nekshan21-Feb-07 0:35 
GeneralRe: hi!! Pin
virendra patel21-Feb-07 0:47
virendra patel21-Feb-07 0:47 
GeneralRe: hi!! Pin
Nekshan21-Feb-07 0:38
Nekshan21-Feb-07 0:38 
AnswerRe: hi!! Pin
Colin Angus Mackay21-Feb-07 0:32
Colin Angus Mackay21-Feb-07 0:32 
GeneralRe: hi!! Pin
Nekshan21-Feb-07 0:36
Nekshan21-Feb-07 0:36 
AnswerRe: hi!! Pin
Guffa21-Feb-07 1:40
Guffa21-Feb-07 1:40 
AnswerRe: hi!! Pin
virendra patel21-Feb-07 16:28
virendra patel21-Feb-07 16:28 
GeneralRe: hi!! Pin
Nekshan21-Feb-07 19:30
Nekshan21-Feb-07 19:30 
QuestionCalling a method from a form in another form [modified] Pin
motojojo20-Feb-07 23:56
motojojo20-Feb-07 23:56 
AnswerRe: Calling a method from a form in another form Pin
Colin Angus Mackay21-Feb-07 0:30
Colin Angus Mackay21-Feb-07 0:30 
AnswerRe: Calling a method from a form in another form Pin
Mark T.21-Feb-07 2:18
Mark T.21-Feb-07 2:18 
AnswerRe: Calling a method from a form in another form Pin
motojojo21-Feb-07 3:56
motojojo21-Feb-07 3:56 
QuestionAdd attribute to the http header of a request Pin
blackjack215020-Feb-07 23:55
blackjack215020-Feb-07 23:55 
AnswerRe: Add attribute to the http header of a request Pin
B.A21-Feb-07 1:30
B.A21-Feb-07 1:30 
Questionproblem in login page Pin
vijayashanthi20-Feb-07 23:43
vijayashanthi20-Feb-07 23:43 
AnswerRe: problem in login page Pin
Colin Angus Mackay21-Feb-07 0:47
Colin Angus Mackay21-Feb-07 0:47 
Questionhow can encrypt a film Pin
B.A20-Feb-07 23:39
B.A20-Feb-07 23:39 
AnswerRe: how can encrypt a film Pin
Mark T.21-Feb-07 2:24
Mark T.21-Feb-07 2:24 
QuestionStopping a Thread Pin
nasambur20-Feb-07 23:22
nasambur20-Feb-07 23:22 
Hi,

I'm writing a LoadGenerator application, in which for a specific period of time
certain no.of Threads are created and executes simultaneously..
That i call as RampUp threads.

After sleeping for a sustain period (10secs) of time.. I want to RampDown threads, that is i want to kill the threads one by one..

I have defined an ArrayList object alThreads to maintain the Threads list..

RampUp() method

public void RampUp()
{
  for(int i=0; i<10; i++)
  {
    Thread thread = new Thread(ExecuteSingleThread);
    thread.Start();
    if(alThread.Contains(thread) == false)
    {
      alThreads.Add(thread);
    }
    Thread.Sleep(5000);
  }
}


The below code kills the thread every five second..

RampDown() method

public void RampDown()
{
for(int i=0;i<alThread.Count;i++)
  {
    Thread thread = (Thread)alThreads[i];
    if(thread.IsAlive)
      thread.Abort();
    Thread.Sleep(5000);
  }
}


Now the problem is after killing the first thread, all the remaining threads
doesn't executes the code inside it..

Please help me..

regards,
nas
AnswerRe: Stopping a Thread Pin
nikneem200520-Feb-07 23:41
nikneem200520-Feb-07 23:41 
GeneralRe: Stopping a Thread Pin
nasambur21-Feb-07 0:48
nasambur21-Feb-07 0:48 
QuestionobjCompilerResults.Errors.Count Pin
nasambur20-Feb-07 23:18
nasambur20-Feb-07 23:18 

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.