<alternative exemplar>
When I implemented the Leader-Follower thread pattern described by Schmidt,
et al in Pattern-Oriented Software Architecture, I couldn't figure out a
way around comparing the thread id to the current leader in the
promote_new_leader function. Probably lack of imagination and/or
experience on my part, but having the thread id sure made it easier.
"William E.
Kempf" To:
--- In Boost-Users@yahoogroups.com, "William E. Kempf"
wrote: olivier_debels said:
I'm using boost_1_29_0 and need to get the id of the current
thread.
Why?
I have several threads which pop messages from the queue. I want to keep track of what each thread pops (depending on some rules) without adding an extra parameter (threadId) in the pop-function.
I don't follow this.
By this way threads just call the pop-function (they don't know anything about the internal cooking of the queue). They get a message, which fulfills the rules (one of the rules is f.e. that no two threads can handle the same message at the same time).
How does a thread id figure into this? What little of this description I understand gives no need for a thread id. William E. Kempf Info: http://www.boost.org Wiki: http://www.crystalclearsoftware.com/cgi-bin/boost_wiki/wiki.pl Unsubscribe: mailto:boost-users-unsubscribe@yahoogroups.com Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/