RE: Re: Thread.Join and the main thread
Russell Stuart <[email protected]>
| Newsgroups | gmane.comp.gnu.dotgnu.developer |
|---|---|
| Organization | Lube Mobile PTY LTD |
| Message-ID | <1085033964.1503.11.camel@ras> |
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.