RE: Re: Thread.Join and the main thread
"Thong (Tum) Nguyen" <tum-x2aT3/[email protected]>
| Newsgroups | gmane.comp.gnu.dotgnu.developer |
|---|---|
| Message-ID | <[email protected]> |
Oh second thought, there's no need to add another function. I could just make ILThreadDestroy recognise the special case for the main thread. > -----Original Message----- > From: Thong (Tum) Nguyen [mailto:tum-x2aT3/[email protected]] > Sent: Thursday, 20 May 2004 6:25 p.m. > To: 'Russell Stuart' > Cc: 'DotGnu-Develop' > Subject: RE: [DotGNU]Re: Thread.Join and the main thread > > The main thread is special in that it never actually finishes running > until > the program exits which means it never notifies anyone joining on it. If > you prefer the second method, then I can add a function > (ILThreadMainFinished) that will make the main thread look like it has > stopped even though it hasn't. > > > > -----Original Message----- > > From: Russell Stuart [mailto:[email protected]] > > Sent: Thursday, 20 May 2004 6:19 p.m. > > To: Thong (Tum) Nguyen > > Cc: 'DotGnu-Develop' > > Subject: RE: [DotGNU]Re: Thread.Join and the main thread > > > > On Thu, 2004-05-20 at 15:56, Thong (Tum) Nguyen wrote: > > > > My personal preference for threads is that in a non-threaded program > > > > there shouldn't be any extra threads. Indeed, I would like to see > > > > hb_gc.c not start a finalizer thread if there is only one thread > > running > > > > - instead it should just run the finalizers synchronously. > > > > > > > > > > Making the GC synchronous until the first thread is created is > something > > I > > > was considering. However, that doesn't solve the mainThread.Join() > > issue. > > > > No, it doesn't. I just didn't want to see it solved by making > > a single threaded app start 4 threads, rather than the current > > 3. > > > > Personally, I thought your second solution was better. It > > seemed nice and consistent that all threads, including the > > one whose entry point is main(), go through very similar > > startup and exit code. > > > > _______________________________________________ > > Developers mailing list > > [email protected] > > http://dotgnu.org/mailman/listinfo/developers > > _______________________________________________ > Developers mailing list > [email protected] > http://dotgnu.org/mailman/listinfo/developers