threads within c++ class

K

kaoz

Hello,

I have written a class and want to start a thread in it. The method
called by the thread is a also class member.

I tried it with pthread.h but it did not work properly. Within the
method called by the thread there is a loop, but it is only called once.
Then the program quits without any error message.

Is there a good thread library for C++ which i could use?

Thanks a lot,
kaoz
 
P

pramod8378

http:://www.boost.org
boost is platform independent and pure object oriented thread library
to use. and yes that will solve your problem of passing a class member
function as thread
 
P

pramod8378

http:://www.boost.org
boost is platform independent and pure object oriented thread library
to use. and yes that will solve your problem of passing a class member
function as thread
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,045
Latest member
DRCM

Latest Threads

Top