I've been working with root, doing a combination of things - experimenting with a number of features. All has been going well until I got to trying some threads.
I'm trying to develop a standalone (compiled/linked) application that uses threads in the most simplistic way and can not find any way to make it run. A native (Linux - Intel) pthreads applicaiton runs fine.
The source for a quick test program is below:
static void* Client(void* _arg)
{
return 0;
}
int main(int argc, char* argv[])
{
/*
* Create the client and server threads
*/
TThread* ptrTServer = new TThread("Server", Server, 0);
TThread* ptrTClient = new TThread("Client", Client, 0);
/*
* Start up the threads
*/
ptrTServer->Run();
ptrTClient->Run();
while(TThread::Exists())
{
TThread::Self()->Ps();
sleep(1);
}
return 0;
}
The output of Ps() only returns the following lines and keeps repeating:
Thread State
2 Client.2051 Running
1 Server.1026 Running // PRTF
Thread State
2 Client.2051 Running // XARequest: XActMutex Locking
1 Server.1026 Running // PRTF
Thread State
2 Client.2051 Running // XARequest: XActMutex Locking
I have created a ./.rootrc and set Root.UseThreads to true, but can not get this thing to work at all.
Any help would be greatly appreciated.
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:45 MET