<?xml version="1.0" encoding="gbk"?>
<rss version="2.0">
<channel>
 <title><![CDATA[LINUX下多线程编程，运行出错：Create pt ..]]></title>
 <link><![CDATA[http://www.aiothome.net/read.php?tid=2913]]></link>
 <description><![CDATA[Latest 20 replies of LINUX下多线程编程，运行出错：Create pt ..]]></description>
 <copyright><![CDATA[Copyright(C) ]]></copyright>
 <generator><![CDATA[PHPWind Forums by PHPWind Studio]]></generator>
 <lastBuildDate><![CDATA[Mon, 27 Jul 2026 20:55:52 +0000]]></lastBuildDate>
  <image>
 <url><![CDATA[images/rss.gif]]></url>
 <title><![CDATA[PHPWind Board]]></title>
 <link><![CDATA[http://www.aiothome.net]]></link>
 <description><![CDATA[]]></description>
  </image>
<item>
 <title><![CDATA[]]></title>
 <description><![CDATA[问题基本解决了，在要创建线程的函数里最上面加上一句：&nbsp;&nbsp;

&nbsp;&nbsp;pthread_detach(pthread_self());&nbsp;&nbsp;&nbsp;&nbsp; // make the pthread separated out ,and hold the pthread exit, release resourses

线程函数里最后面加上句：


 pthread_exit(0);]]></description>
 <link><![CDATA[http://www.aiothome.net/read.php?tid=2913#9525]]></link>
 <author><![CDATA[happycxz]]></author>
 <category><![CDATA[Linux技术交流区]]></category>
 <pubdate><![CDATA[Thu, 03 Sep 2009 05:29:13 +0000]]></pubdate>
</item>
<item>
 <title><![CDATA[]]></title>
 <description><![CDATA[偶顶！]]></description>
 <link><![CDATA[http://www.aiothome.net/read.php?tid=2913#9515]]></link>
 <author><![CDATA[happycxz]]></author>
 <category><![CDATA[Linux技术交流区]]></category>
 <pubdate><![CDATA[Thu, 03 Sep 2009 02:28:16 +0000]]></pubdate>
</item>
<item>
 <title><![CDATA[回 1楼(kasim) 的帖子]]></title>
 <description><![CDATA[可以确定，我程序里没有线程数量超标，同时只有四个线程在运行，两个死循环的线程，一个据条件而触发创建的活动线程（就是这个里面出了问题。），还有一个就是主程序自己是一个线程（不知道我这么说是否合理）。

活动进程是一次性的，执行完了自动结束。

出现这个错误，会是什么原因呢？请帮我分析一下，谢谢！]]></description>
 <link><![CDATA[http://www.aiothome.net/read.php?tid=2913#9509]]></link>
 <author><![CDATA[happycxz]]></author>
 <category><![CDATA[Linux技术交流区]]></category>
 <pubdate><![CDATA[Thu, 03 Sep 2009 01:17:11 +0000]]></pubdate>
</item>
<item>
 <title><![CDATA[]]></title>
 <description><![CDATA[[quote]
Return Value

If successful, the pthread_create() function shall return zero; otherwise, an error number shall be returned to indicate the error. 

Errors

The pthread_create() function shall fail if: 
EAGAIN 
The system lacked the necessary resources to create another thread, or the syste ..]]></description>
 <link><![CDATA[http://www.aiothome.net/read.php?tid=2913#9507]]></link>
 <author><![CDATA[kasim]]></author>
 <category><![CDATA[Linux技术交流区]]></category>
 <pubdate><![CDATA[Thu, 03 Sep 2009 01:11:11 +0000]]></pubdate>
</item>
</channel></rss>