Re: [Boost-users] HowTo Pass arguments to boost threads?

Thanks Moshe! This pretty much sums it up from that article: "An overloaded constructor takes a function object called with no arguments and returning nothing. This constructor starts a new thread of execution, which in turn calls the function object. " Very nice article too. I must have missed that when I searched Dobbs. Graham ----- Original Message ---- From: Moshe Matitya <Moshe.Matitya@Kayote.com> To: boost-users@lists.boost.org Sent: Tuesday, December 12, 2006 5:40:03 AM Subject: Re: [Boost-users] HowTo Pass arguments to boost threads? Forever Kid wrote:
What is the method boost prefers to pass arguments to boost threads? (such as a pointer to some class object)
I saw the class thread_specific_ptr. Is thread_specific_ptr designed for this purpose?
Is there a recommended site with boost examples to check out? Boost has good documentation, although I prefer to learn by example and use strict documentation as I become more experienced.
Thanks much, Graham
Take a look this introductory article on Boost.Threads by Bill Kempf: http://www.ddj.com/184401518 It addresses the question you're asking in a very clear, straightforward manner, with examples. Moshe _______________________________________________ Boost-users mailing list Boost-users@lists.boost.org http://lists.boost.org/mailman/listinfo.cgi/boost-users ____________________________________________________________________________________ Do you Yahoo!? Everyone is raving about the all-new Yahoo! Mail beta. http://new.mail.yahoo.com
participants (1)
-
Forever Kid