Can one java thread create another java thread?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ganeshp
    New Member
    • May 2007
    • 38

    Can one java thread create another java thread?

    hi All,

    I have crated a thread and in that tread i have created one more thread?
    is it ok to do this ?
    i am not getting any errors,

    regards,
    Ganesh
  • numberwhun
    Recognized Expert Moderator Specialist
    • May 2007
    • 3467

    #2
    Originally posted by ganeshp
    hi All,

    I have crated a thread and in that tread i have created one more thread?
    is it ok to do this ?
    i am not getting any errors,

    regards,
    Ganesh
    This is a forum for questions that do not fit any of the other categories. Your question, however, is Java related.

    I am moving this to the Java forum.

    Regards,

    Moderator

    Comment

    • r035198x
      MVP
      • Sep 2006
      • 13225

      #3
      Originally posted by ganeshp
      hi All,

      I have crated a thread and in that tread i have created one more thread?
      is it ok to do this ?
      i am not getting any errors,

      regards,
      Ganesh
      It didn't give you errors so it's legal.
      Anyway the main thread is always running so any thread you create is already created inside another thread.
      Is it OK? Well that depends on the problem you are trying to solve.

      Comment

      • ganeshp
        New Member
        • May 2007
        • 38

        #4
        Originally posted by r035198x
        It didn't give you errors so it's legal.
        Anyway the main thread is always running so any thread you create is already created inside another thread.
        Is it OK? Well that depends on the problem you are trying to solve.
        Yes it is OK
        thank you
        regards
        Ganesh

        Comment

        Working...