|
Boost Users : |
From: Marc Mutz (marc_at_[hidden])
Date: 2006-02-15 06:34:47
On Wednesday 15 February 2006 01:03, João Abecasis wrote:
> > C++ question. Use &MyClass::ChildThreadFunction as bind's first argument.
> > You will probably also run into trouble with passing the int by reference
> > (why?).
>
> Because MyClass::ChildThreadFunc is run in a different thread, in a
> separate timeline, and when it runs the variable ii may no longer exist
> (?).
I'm sorry. This wasn't mean to be a GotW-style 'why?', but just short for
"why did you do it that way?" :)
But thanks nonetheless, yes, that's what I had in mind :)
Marc
-- Marc Mutz -- marc_at_[hidden], mutz_at_[hidden] Klarälvdalens Datakonsult AB, Platform-independent software solutions
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