Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. problem with threads

problem with threads

Scheduled Pinned Locked Moved C#
helpsysadminquestionannouncement
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    prasadbuddhika
    wrote on last edited by
    #1

    i,ve developed a simple concurrent server and each client is handled by a new thread, after doing some function in the child thread i update the main form using a delegate, the problem is when an exception is occurred in the child thread even though it is handled my whole application get stuck. what might be the solution for this senario. and i would like to know , once the child thread is returned is it terminated by itself or do i have to do it manually?

    C N 2 Replies Last reply
    0
    • P prasadbuddhika

      i,ve developed a simple concurrent server and each client is handled by a new thread, after doing some function in the child thread i update the main form using a delegate, the problem is when an exception is occurred in the child thread even though it is handled my whole application get stuck. what might be the solution for this senario. and i would like to know , once the child thread is returned is it terminated by itself or do i have to do it manually?

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      It terminates itself, I believe. Your best bet is a try/catch to catch any errors you may anticipate and which you want to ignore.

      Christian Graus Driven to the arms of OSX by Vista.

      1 Reply Last reply
      0
      • P prasadbuddhika

        i,ve developed a simple concurrent server and each client is handled by a new thread, after doing some function in the child thread i update the main form using a delegate, the problem is when an exception is occurred in the child thread even though it is handled my whole application get stuck. what might be the solution for this senario. and i would like to know , once the child thread is returned is it terminated by itself or do i have to do it manually?

        N Offline
        N Offline
        Najmal
        wrote on last edited by
        #3

        hi... U must terminate child thread when an exception occured..... for more information click below link... About Threading in c#

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups