[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Launch and work with threads in Commonc++
From: |
address@hidden |
Subject: |
Launch and work with threads in Commonc++ |
Date: |
Wed, 23 May 2001 20:21:43 +0200 |
User-agent: |
Mutt/1.2.5i |
Hi, I need to launch a few threads, and i dont know the correct way to do it.
I send a copy of the source code, but when it runs give a segmentation fault,
and i dont know why. If someone colul help me, thanks.
The source code is:
-------8<--------8<------
#include <iostream>
#include <cc++/thread.h>
#include <cc++/serial.h>
int main (int argc, char **argv)
{
SerialService puerto;
cout << "Puerto" << endl;
Thread *hebra;
// hebra = new Thread();
hebra->Start();
if(hebra->isRunning()) // This give a segfault
{ cout << "Hola" << endl;
}
else cout << "no¡" << endl;
// Sleep(100000); // those two lines dont compile
// Exit(); //
}
--------8<---------8<-------
Thanks a lot!
--
Luis M. Arroyo Egoscozabal
lmarroyo at overclk dot dhis dot org
lmae at bbvnet dot com
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Launch and work with threads in Commonc++,
address@hidden <=