threads within c++ class

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • kaoz

    #1

    threads within c++ class

    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
  • technator

    #2
    Re: threads within c++ class

    I just googled and came across this site. This is not a standard C++
    library but would help with code samples.



    Regards
    Ankur

    Comment

    • pramod8378@yahoo.com

      #3
      Re: threads within c++ class

      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

      Comment

      • pramod8378@yahoo.com

        #4
        Re: threads within c++ class

        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

        Comment

        Working...