threads - basic introduction

looking through the boost.threads doc and there doesn't seem to be any "getting started" guide like entry. I often find these are easier to read and get to know the library a little bit before hitting the reference. Is there any out there somewhere?

--- Noah Roberts wrote:
I found a C++ multithreading tutorial at <http://paulbridger.net/ > featuring Boost.Threads that might be worth looking at. Cromwell D. Enage ____________________________________________________________________________________ Never Miss an Email Stay connected with Yahoo! Mail on your mobile. Get started! http://mobile.yahoo.com/services?promote=mail

On 2/14/07, Noah Roberts
There are a number of examples with some limited explanations at http://www.ddj.com/184401518 ~ Scott McMurray

Ok, thank you I will look at those resources. I also purchased an
account with the ACM digital library so have access to many of the
sources cited in the boost doc.
One question I do have though.
I am creating a functor object like so (ignore the CLI crap, it isn't
relevant):
class connection_thread_proc
{
gcroot

Noah Roberts wrote:
It works by design. The constructor of boost::thread makes a private copy of the function object and keeps it alive until its operator() returns. The boost::thread object itself is irrelevant, the function object is part of the thread state block kept by the newly spawned thread. You can use boost::bind( &Listener::run, l, s ) instead of writing a function object by hand, although I don't know how it will react to your ^ thingies. :-)

Peter Dimov wrote:
Badly. Very badly. It's probably as simple as boost::function not having any specializations for CLI reference types but I'm not going to try and figure out how to make them. I'm actually going to work toward weeding out all CLI crap and using C++. Unfortunately I'm working with a COM object that isn't behaving too well apparently and I'm no expert with COM. But that's neither here nor there...there are a few boost things that can't handle CLI types, which is not at all surprising. boost::function is one of those things, the output is about a mile long with a big screw you at the end.
participants (4)
-
Cromwell Enage
-
me22
-
Noah Roberts
-
Peter Dimov