This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [rfc] no more than 1020 threads total in a processes lifetime?


On Mon, Dec 25, 2000 at 01:06:50PM -0000, Wolfram Gloger wrote:
> > On Sun, Dec 24, 2000 at 07:44:35PM +0200, Momchil Velikov wrote:
> > > >>>>> "Ben" == Ben Collins <bcollins@debian.org> writes:
> > > Ben> Well, since you've taken the time to declare the FAQ to be incorrect,
> > > Ben> and the test case to be incorrect aswell, could you at the very least
> > > Ben> point out how it is incorrect?
> > > 
> > > no pthread_detach()
> > 
> > Thanks, that does resolve the problem. Much appreciated.
> 
> Hmm, not really.  Even when creating the threads detached, your test
> case is probably not testing what you want it to test.  It has no
> synchronisation between the main thread and the terminating
> (sub)threads.  Depending on scheduling and the number of CPUs you
> have, your test might just be testing how many threads can run _at the
> same time_, and for this there is indeed a fixed limit.  Remember that
> pthread_create() may return practically immediately, the created
> subthread may start to run much later.  Also, since your main thread
> does `return 0', equivalent to exit(0), any subthreads that have not
> run to completion (perhaps not even started) are just killed at that
> point.

It is the test case supplied by the bug reporter. The pthread_detach
makes i perform as he expects, so I am satisfied with the solution.

Thanks

-- 
 -----------=======-=-======-=========-----------=====------------=-=------
/  Ben Collins  --  ...on that fantastic voyage...  --  Debian GNU/Linux   \
`  bcollins@debian.org  --  bcollins@openldap.org  --  bcollins@linux.com  '
 `---=========------=======-------------=-=-----=-===-======-------=--=---'

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]