Jean,
I'm not familiar with Boost.Thread yet, but the documentation for 1.36.0 suggests you can call the thread constructor with multiple arguments as you're doing. Docs for 1.35.0 don't mention that constructor so I wonder if you're using 1.35.0 or before, but reading documentation for 1.36.0?
As suggested by others, boost::bind looks like it'll help.
Regards,
Pete
--- On Sat, 23/8/08, Jean-Sebastien Stoezel
From: Jean-Sebastien Stoezel
Subject: [Boost-users] Passing an argument to threads (boost::thread) To: boost-users@lists.boost.org Date: Saturday, 23 August, 2008, 10:22 PM 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
Thanks, Jean
_______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users