Boost logo

Boost Users :

From: Cory Nelson (phrosty_at_[hidden])
Date: 2008-08-23 18:29:37


On Sat, Aug 23, 2008 at 2:22 PM, Jean-Sebastien Stoezel
<js.stoezel_at_[hidden]> wrote:
> Hello,
>
> How to pass arguments to a thread?
>
> From the documentation I thought I could do this:
> mp_ProcessorListenerThread = new boost::thread(ProcessorListener, this);
>
> However I get the following error:
> 'boost::thread::thread' : no overloaded function takes 2 arguments
>

new boost::thread(boost::bind(&MyClass::ProcessorListener, this));

-- 
Cory Nelson

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net