meyers: Item 12: Effective C++

Discussion in 'C++' started by John, Apr 27, 2005.

  1. John

    John Guest

    I am looking for a good Lock class implementation that
    has barely been implemented in Effective STL of Myers (Item 12).
    Any pointers?

    Is there an implementation that is good for both OpenMP and pthreads?

    Thanks,
    --j
     
    John, Apr 27, 2005
    #1
    1. Advertising

  2. John

    Phlip Guest

    John wrote:

    > I am looking for a good Lock class implementation that
    > has barely been implemented in Effective STL of Myers (Item 12).
    > Any pointers?


    If you mean an object that locks on construction and unlocks on destruction,
    they are all over the place.

    > Is there an implementation that is good for both OpenMP and pthreads?


    Why are you using threads?

    --
    Phlip
    http://www.c2.com/cgi/wiki?ZeekLand
     
    Phlip, Apr 27, 2005
    #2
    1. Advertising

  3. John

    John Guest

    I would like to have the option of using OpenMP or threads
    depending on the architecture / compiler. Hence I asked.

    Phlip wrote:
    > John wrote:
    >
    > > I am looking for a good Lock class implementation that
    > > has barely been implemented in Effective STL of Myers (Item 12).
    > > Any pointers?

    >
    > If you mean an object that locks on construction and unlocks on

    destruction,
    > they are all over the place.
    >
    > > Is there an implementation that is good for both OpenMP and

    pthreads?
    >
    > Why are you using threads?
    >
    > --
    > Phlip
    > http://www.c2.com/cgi/wiki?ZeekLand
     
    John, Apr 27, 2005
    #3
  4. John wrote:

    > I am looking for a good Lock class implementation that
    > has barely been implemented in Effective STL of Myers (Item 12).
    > Any pointers?
    >
    > Is there an implementation that is good for both OpenMP and pthreads?



    OpenMP and thread-locking don't sound they have anything to do with each other.


    --
    Ioannis Vranos

    http://www23.brinkster.com/noicys
     
    Ioannis Vranos, Apr 27, 2005
    #4
  5. Ioannis Vranos wrote:

    > OpenMP and thread-locking don't sound they have anything to do with each
    > other.


    Forget that I said that.



    --
    Ioannis Vranos

    http://www23.brinkster.com/noicys
     
    Ioannis Vranos, Apr 27, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Fred Ma
    Replies:
    15
    Views:
    636
    Fred Ma
    Jan 30, 2004
  2. Peter
    Replies:
    15
    Views:
    871
    Diego Martins
    Feb 27, 2007
  3. EDG
    Replies:
    1
    Views:
    853
    Markus Schoder
    Jun 30, 2007
  4. EDG
    Replies:
    2
    Views:
    547
    Richard Heathfield
    Jun 30, 2007
  5. Christopher Pisz
    Replies:
    2
    Views:
    123
    James Kanze
    Apr 1, 2014
Loading...

Share This Page