Philippe A. Bouchard wrote:


        lock()...
        if (thread() == f1 || thread() == f2)
        {
                thread()..(whatever casts)...m_list;
        }
        unlock()...

// I think the only way to do this is by mapping the thread's id // with the object's address (map<key, functor1 *>) but there is
// no standard key publicly accessible and map<> creates overhead.

Do you mean which thread is currently executing? Both threads are effectively executing and you code here is inside a third thread and that is what thread() would actually return, not either thread1 or thread2. Maybe I'm missing something.


More information about what you are trying to do would be helpful because currently I don't get it.

Cheers

Russell


_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

Reply via email to