11 Nov
2005
11 Nov
'05
8:29 a.m.
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.