C# abroting a thread

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chathura86
    New Member
    • May 2007
    • 227

    C# abroting a thread

    i have the following code running in a thread

    [code=c#]
    while(true){
    //some coding.....
    //..........
    //........
    thread.currenTh read.suspend();
    }
    [/code]

    this code is working fine.now i want to abrote this thread when the application
    is closing.
    i tried

    thread.abrote() but it throws an exception saing that thread is suspended.

    please help me to solve this.

    thank you

    chathura
  • mvenkatesan
    New Member
    • May 2007
    • 39

    #2
    Originally posted by chathura86
    i have the following code running in a thread

    [code=c#]
    while(true){
    //some coding.....
    //..........
    //........
    thread.currenTh read.suspend();
    }
    [/code]

    this code is working fine.now i want to abrote this thread when the application
    is closing.
    i tried

    thread.abrote() but it throws an exception saing that thread is suspended.

    please help me to solve this.

    thank you

    chathura
    Pl use delegate and runnig thread cannot abort

    Venky

    Comment

    • chathura86
      New Member
      • May 2007
      • 227

      #3
      Originally posted by mvenkatesan
      Pl use delegate and runnig thread cannot abort

      Venky
      i'm new to c# could you please explain how to use a delegate
      please send me an example if you can.or link to a good example

      thank you,
      chathura

      Comment

      • kenobewan
        Recognized Expert Specialist
        • Dec 2006
        • 4871

        #4
        You need to spell correctly when programming, there is usually zero tolerance for such mistakes. Suggest you read stickies and do some more research, then post again when you have had another try. Thanks.

        Comment

        Working...