thread problem ?????

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dmjpro
    Top Contributor
    • Jan 2007
    • 2476

    thread problem ?????

    at first tell me ... is there any concept of parent thread and child thread in java?????

    if i start a thread in side a thread then ... sholud the child thread be closed before parent thread closed ... here the parent thread is not the main thread ......

    plz help me out .......


    thanxxxx
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    Originally posted by dmjpro
    at first tell me ... is there any concept of parent thread and child thread in java?????

    if i start a thread in side a thread then ... sholud the child thread be closed before parent thread closed ... here the parent thread is not the main thread ......

    plz help me out .......


    thanxxxx
    A thread can start other threads if that's what you are asking.
    The main thread for example is responsible for starting all other threads in your application.

    Comment

    • dmjpro
      Top Contributor
      • Jan 2007
      • 2476

      #3
      thanxx for ur reply .....

      if a thread started from a thread and the parent thread closed before the child thread .... if this happens in java then anything wring with my code

      i think there is no concept of parent thread and child thread in java as the process (Parent and Child) ..... except main thread


      plz help..... thanxxxxx

      Comment

      • r035198x
        MVP
        • Sep 2006
        • 13225

        #4
        Originally posted by dmjpro
        thanxx for ur reply .....

        if a thread started from a thread and the parent thread closed before the child thread .... if this happens in java then anything wring with my code

        i think there is no concept of parent thread and child thread in java as the process (Parent and Child) ..... except main thread


        plz help..... thanxxxxx
        Not possible. If the main thread exits, the whole application exits similarly for other threads.

        Comment

        • dmjpro
          Top Contributor
          • Jan 2007
          • 2476

          #5
          i think still u not got my point ....

          a main thread started and then thread A started from main thread abd thread B started from thread A...

          now the main thread is still running and thread A stopped but is it possible to keep alive thread B...

          i think u got my point right now ..... plz help

          Comment

          • r035198x
            MVP
            • Sep 2006
            • 13225

            #6
            Originally posted by dmjpro
            i think still u not got my point ....

            a main thread started and then thread A started from main thread abd thread B started from thread A...

            now the main thread is still running and thread A stopped but is it possible to keep alive thread B...

            i think u got my point right now ..... plz help
            If thread B was started from thread A, then thread B will terminate before thread A terminates. When a thread terminates, it releases all its resouces including memory and stops all threads that were started from within it.

            Comment

            • dmjpro
              Top Contributor
              • Jan 2007
              • 2476

              #7
              ok let's seee ........

              i m online , i will contact later

              Comment

              Working...