求救:boost的Thread多线程使用问题
boost中,在使用thread线程库时,
在某个线程中调用其函数对象其它的方法,
被调用的方法执行完成后无法正常返回.
如:
class clsThread
{
public:
clsThread()
{}
operator()()
{
int a;
a = func1();
while(!a)
{....}
}
int func1()
{
.....
.....
return 0;
}
};
boost::thread thrd(clsThread());
在执行func1(),运行到return 0时无法返回到operator()()中.
而且用BoundsCheck查到boost的thread库中有比较多的内存泄漏.
拜托各位老大指点.