How many threads are you trying to create? I mean, using your class CThread...
I see only a problem when trying to create more than one thread, due
to the "static CThread*  m_pThis". This attribute should not be shared
between all threads you create. I think you want to have a
relationship 1 to 1, for each instance of CThead class you want to
have one actual running thread handling with.
  
Sandro.
 
 
----------------------------------------------------------------------------------------
  
> On Apr 7, 2005 4:01 PM, Dar�o Mariani <[EMAIL PROTECTED]> wrote: 
> > There are several libraries that implement multithreading in C++:
> > 
> > * http://www.boost.org
> > * http://www.melikyan.com/ptypes/
> > * http://www.cs.wustl.edu/~schmidt/ACE.html
> > 
> > You can use one of them and avoid the trouble of creating your own
> > library, or look there to see how they did it ;-).
> > 
> >           Dar�o
> > 
> > On Apr 7, 2005 3:52 PM, Huber, George K RDECOM CERDEC STCD SRI
> > <[EMAIL PROTECTED]> wrote:
> > > Eric wrote:
> > >
> > > Did you compile with -lpthread and -D_REENTRANT? If I remeber correctly, 
> > > this
> > > is something I had alot of trouble with when I started thread programming.
> > > Similiar error and everything. Compiled but the library calls weren't
> > > working. Make sure to include <pthread.h> too  ;)
> > >
> > > yes included <pthread.h>, defined -D_REENTRANT and linked with -lpthread
> > >
> > > I have written multi-threaded code in C, this is the first time that I 
> > > have attempted
> > > to encapsulate a thread in a C++ object.  Must be missing something. :-(
> > >
> > > George
> > > -
> > > To unsubscribe from this list: send the line "unsubscribe 
> > > linux-c-programming" in
> > > the body of a message to [EMAIL PROTECTED]
> > > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > >
> > 
> > --
> > That is not dead which can eternal lie,
> > and with strange aeons, even death may die.
> > -
> > To unsubscribe from this list: send the line "unsubscribe 
> > linux-c-programming" in
> > the body of a message to [EMAIL PROTECTED]
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html
> > 
> 
>
-
To unsubscribe from this list: send the line "unsubscribe linux-c-programming" 
in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to