Re: pthread creates one extra thread

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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/


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux