threads within c++ class

Discussion in 'C++' started by kaoz, Nov 20, 2005.

  1. kaoz

    kaoz Guest

    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
     
    kaoz, Nov 20, 2005
    #1
    1. Advertising

  2. kaoz

    technator Guest

    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
     
    technator, Nov 20, 2005
    #2
    1. Advertising

  3. kaoz

    Guest

    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
     
    , Nov 21, 2005
    #3
  4. kaoz

    Guest

    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
     
    , Nov 21, 2005
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. E11
    Replies:
    1
    Views:
    4,789
    Thomas Weidenfeller
    Oct 12, 2005
  2. yoda
    Replies:
    2
    Views:
    445
    =?utf-8?Q?Bj=C3=B6rn_Lindstr=C3=B6m?=
    Aug 1, 2005
  3. threads without threads

    , Aug 27, 2004, in forum: C Programming
    Replies:
    4
    Views:
    411
    William Ahern
    Aug 27, 2004
  4. Pedro Pinto

    Java Threads - Get running threads

    Pedro Pinto, Apr 8, 2008, in forum: Java
    Replies:
    2
    Views:
    1,454
    Arne Vajhøj
    Apr 9, 2008
  5. Une bévue
    Replies:
    0
    Views:
    156
    Une bévue
    Jun 14, 2006
Loading...

Share This Page