|
Boost : |
From: Russell Hind (rhind_at_[hidden])
Date: 2003-07-01 03:00:53
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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk