[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: pthread creates one extra thread
> Where is my fault?
look at some docs for linuxthreads ( google for it).
its the way linuxthreads is implemented.
Muthu
>
> On Mon, 05 Jan 2004 19:02:14 -0500
> Rob Love <rml@ximian.com> wrote:
>
> > On Mon, 2004-01-05 at 18:28, Jan Krause wrote:
> > > I found out that if you uncomment the while line in the my_func_1 function,
> > > your code works as wished and creates 2 threads.
> > >
> > > Unfortunately I dont really know why the while loop is unnecessary. ;)
> >
> > If you get rid of the while loop, the thread exits immediately.
> >
> > And thus you will see a total of two threads (the original thread and
> > the master thread).
> >
> > Rob Love
> >
> >
> >
> > --
> > Kernelnewbies: Help each other learn about the Linux kernel.
> > Archive: http://mail.nl.linux.org/kernelnewbies/
> > FAQ: http://kernelnewbies.org/faq/
> >
> >
>
> --
> Kernelnewbies: Help each other learn about the Linux kernel.
> Archive: http://mail.nl.linux.org/kernelnewbies/
> FAQ: http://kernelnewbies.org/faq/
>
--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive: http://mail.nl.linux.org/kernelnewbies/
FAQ: http://kernelnewbies.org/faq/