Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > threads within c++ class

Reply
Thread Tools

threads within c++ class

 
 
kaoz
Guest
Posts: n/a
 
      11-20-2005
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
 
Reply With Quote
 
 
 
 
technator
Guest
Posts: n/a
 
      11-20-2005
I just googled and came across this site. This is not a standard C++
library but would help with code samples.

http://threads.sourceforge.net/

Regards
Ankur

 
Reply With Quote
 
 
 
 
pramod8378@yahoo.com
Guest
Posts: n/a
 
      11-21-2005
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

 
Reply With Quote
 
pramod8378@yahoo.com
Guest
Posts: n/a
 
      11-21-2005
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Java Threads - Get running threads Pedro Pinto Java 2 04-08-2008 11:44 PM
TB View, Threads, Threads with unread The Invisible Man Firefox 1 03-20-2006 02:09 AM
Nested Class, Member Class, Inner Class, Local Class, Anonymous Class E11 Java 1 10-12-2005 03:34 PM
Standard Threads vs Weightless Threads yoda Python 2 08-01-2005 09:12 PM
threads without threads sindica@gmail.com C Programming 4 08-27-2004 09:25 PM



Advertisments