Boost logo

Boost Users :

From: Bondarenko Denis (storm_at_[hidden])
Date: 2005-11-11 03:29:12


Hello!
I'm trying to use Boost.Thread in my application. I created my class
with overloaded operator ( ) and pass it's object to the thread
constructor. Thread runs, it's ok. But as I understand, when I pass my
object to the thread constructor, thread makes a copy of it. So when I
try to send a message (call a method) to MY object, running thread
doesn't receive it, because it is a COPY. I solved this problem by
giving to the thread object a pointer to a parent object (some kind of
callback), but it's not quite suitable. How can I access the copy of my
object, which is used by Boost.Thread? Is it possible or giving a
pointer to parent object is the only way?
Will be grateful for your assistance.

Best regards,
Denis.


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