Re: Squid AsyncIO and LinuxThread

From: Andres Kroonmaa <andre@dont-contact.us>
Date: Fri, 25 Sep 1998 09:36:10 +0300 (EETDST)

On 25 Sep 98, at 0:08, Henrik Nordstrom <hno@hem.passagen.se> wrote:

> Duane Wessels wrote:
>
> > In this case, squid is not generating a coredump from a thread
> > process. The code with the assertion always only executes in
> > the main process, never in a thread.
>
> Duane, when a application begins to use threads the "main process" is
> converted into a thread. There is no process distinction between
> different threads of the same program.

 thats right generally,

> About the only thing different with the main thread is what happens when
> the main thread exits, it then brings down all threads in the
> applications, while other threads simply vanishes (some status is kept,
> but not the thread).

 but there is a slight difference. There is a notion of "parent thread"
 that is introduced via notion of "detached" or not detached thread.
 The detached thread is what you call totally independant thread. such
 threads will continue even if you exit the main thread.
 Not detached thread are like children of the main (or any other) thread
 and are dependant on their parent status. If there is no detached thread
 in a process and main exits, the whole process exits, but it will not
 exit until last detached thread exits.

 ----------------------------------------------------------------------
  Andres Kroonmaa mail: andre@online.ee
  Network Manager
  Organization: MicroLink Online Tel: 6308 909
  Tallinn, Sakala 19 Pho: +372 6308 909
  Estonia, EE0001 http://www.online.ee Fax: +372 6308 901
 ----------------------------------------------------------------------
Received on Tue Jul 29 2003 - 13:15:54 MDT

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:11:56 MST