c++ and multithreading

Discussion in 'C++' started by Le Tubs, Dec 13, 2005.

  1. Le Tubs

    Le Tubs Guest

    Hi

    I'm trying to find out some information about the following classes
    being thread safe (atomic), ifstream/ofstream. I have looked on google
    but have seemed to have gotten more confused before I started.
    Is there a good link or refernces that sort of deal with c++ classes &
    miltithreading someone could recommend?

    Any tips, links or pointers would be greatly appreciated.

    Kindest Regards
    David
     
    Le Tubs, Dec 13, 2005
    #1
    1. Advertising

  2. Le Tubs wrote:
    > Hi
    >
    > I'm trying to find out some information about the following classes
    > being thread safe (atomic), ifstream/ofstream. I have looked on google
    > but have seemed to have gotten more confused before I started.
    > Is there a good link or refernces that sort of deal with c++ classes &
    > miltithreading someone could recommend?


    It depends on what you mean by thread safe. Note that thread safety
    does not imply atomicity.

    > Any tips, links or pointers would be greatly appreciated.


    http://www.sgi.com/tech/stl/thread_safety.html
     
    Maxim Yegorushkin, Dec 13, 2005
    #2
    1. Advertising

  3. Le Tubs

    mlimber Guest

    Le Tubs wrote:
    > Hi
    >
    > I'm trying to find out some information about the following classes
    > being thread safe (atomic), ifstream/ofstream. I have looked on google
    > but have seemed to have gotten more confused before I started.
    > Is there a good link or refernces that sort of deal with c++ classes &
    > miltithreading someone could recommend?
    >
    > Any tips, links or pointers would be greatly appreciated.
    >
    > Kindest Regards
    > David


    Standard C++ knows nothing of multithreading, and consequently,
    standard C++ objects are not innately thread-safe, but you can fairly
    easily wrap them with your platform-specific synchronization objects.
    See this article for a snazzy technique:

    http://www.cuj.com/documents/s=7998/cujcexp1902alexandr/

    See also the Boost.Threads library:

    http://boost.org/doc/html/threads.html

    Cheers! --M
     
    mlimber, Dec 13, 2005
    #3
  4. Le Tubs wrote:
    > Is there a good link or refernces that sort of deal with c++ classes &
    > miltithreading someone could recommend?


    news:comp.programming.threads

    V
     
    Victor Bazarov, Dec 13, 2005
    #4
  5. Le Tubs

    David Harmon Guest

    On 13 Dec 2005 07:06:02 -0800 in comp.lang.c++, "Le Tubs"
    <> wrote,
    >I'm trying to find out some information about the following classes
    >being thread safe (atomic), ifstream/ofstream.


    Unless your compiler/library vendor makes some special promise,
    they are in no way thread safe.
     
    David Harmon, Dec 13, 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. Ilia
    Replies:
    6
    Views:
    3,044
    John Saunders
    Nov 4, 2003
  2. Imran

    Multithreading and Sessions

    Imran, Jan 28, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    473
    bruce barker
    Jan 28, 2004
  3. =?Utf-8?B?U2hhcGlybw==?=

    HttpModule multithreading and request and response corelation

    =?Utf-8?B?U2hhcGlybw==?=, Dec 7, 2004, in forum: ASP .Net
    Replies:
    7
    Views:
    811
    Scott Allen
    Dec 8, 2004
  4. techie

    Web Garden and multithreading query

    techie, Sep 1, 2005, in forum: ASP .Net
    Replies:
    9
    Views:
    2,860
    techie
    Sep 6, 2005
  5. Ilia Poliakov

    multithreading and member-functions

    Ilia Poliakov, Sep 3, 2003, in forum: C++
    Replies:
    16
    Views:
    843
    Attila Feher
    Sep 5, 2003
Loading...

Share This Page