Boost logo

Boost Users :

From: dick.bridges_at_[hidden]
Date: 2002-12-17 12:16:12


<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.
</alternative exemplar>

                                                                                                                                      
                      "William E.
                      Kempf" To: <Boost-Users_at_[hidden]>
                      <wekempf_at_[hidden] cc:
> Subject: Re: [Boost-Users] Re: Thread library: get thread id
                                                                                                                                      
                      12/16/2002 01:20
                      PM
                      Please respond
                      to Boost-Users
                                                                                                                                      
                                                                                                                                      

olivier_debels said:
> --- In Boost-Users_at_[hidden], "William E. Kempf" <wekempf_at_c...>
> 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_at_[hidden]>

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/


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