Results 1 to 3 of 3

Thread: Background thread

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2010
    Posts
    402

    Background thread

    Currently I have a program that runs on the UI thread. When an option is selected, it starts a new thread (backgroundthread1), with the parameter background=true. Once this thread commences, backgroundthread1 then starts another thread (backgroundthread2) with the param background=2.

    Should backgroundthread1 finish/ terminate, what happens to backgroundthread2.

    Does it to continue to run until it either completes or the UI thread finish

    Or does it terminate as soon as backgroundthread1 terminates?
    Last edited by Signalman; May 30th, 2014 at 06:53 PM.

  2. #2
    Member
    Join Date
    Jul 2013
    Posts
    56

    Re: Background thread

    I would assume itd continue running, the thread hat called it, is all it did, it doesnt rely on it to actually run

  3. #3
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    110,350

    Re: Background thread

    There's no specific relationship between backgroundthread1 and backgroundthread2. Each thread will just continue executing until it either completes, is aborted or, in the case of background threads, the application exits.

    I have to wonder though, why did you need to post this question at all when you could have just tested it for yourself?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width