Boost logo

Boost Users :

From: Patrick (patrick_at_[hidden])
Date: 2006-01-27 18:02:57

You are correct the "boost::ref(*this)" is not needed.

Simple(boost::bind(&Simple::run, this))

-----Original Message-----
From: boost-users-bounces_at_[hidden]
[mailto:boost-users-bounces_at_[hidden]] On Behalf Of Christian Henning
Sent: Friday, January 27, 2006 4:47 PM
To: boost-users_at_[hidden]
Subject: Re: [Boost-users] Spawning a thread on a member function

This is even simpler. Is there is reason for "boost::ref(*this)" ?

class Simple
   Simple() : th( boost::bind( run, this ))

   void run()
               //Thread's work goes here.


   boost::thread th;

Boost-users mailing list

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at