Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost thread: class member problem
From: Patricia Hazel Shaw [phs] (phs_at_[hidden])
Date: 2011-01-27 09:41:11


>
> create_thread() takes a single callable object as the parameter, so if
> you want to call a member function you must wrap it with bind:
>
> threads.create_thread(boost::bind(&Board::boxAction,this,1));
>
Thank you, I came close to the right syntax at one point then, but now that works.
Patricia.

> Anthony
> --
> Author of C++ Concurrency in Action http://www.stdthread.co.uk/book/
> just::thread C++0x thread library http://www.stdthread.co.uk
> Just Software Solutions Ltd http://www.justsoftwaresolutions.co.uk
> 15 Carrallack Mews, St Just, Cornwall, TR19 7UL, UK. Company No. 5478976
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users


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