Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > c++ and multithreading

Reply
Thread Tools

c++ and multithreading

 
 
Le Tubs
Guest
Posts: n/a
 
      12-13-2005
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

 
Reply With Quote
 
 
 
 
Maxim Yegorushkin
Guest
Posts: n/a
 
      12-13-2005

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

 
Reply With Quote
 
 
 
 
mlimber
Guest
Posts: n/a
 
      12-13-2005
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/...p1902alexandr/

See also the Boost.Threads library:

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

Cheers! --M

 
Reply With Quote
 
Victor Bazarov
Guest
Posts: n/a
 
      12-13-2005
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
 
Reply With Quote
 
David Harmon
Guest
Posts: n/a
 
      12-13-2005
On 13 Dec 2005 07:06:02 -0800 in comp.lang.c++, "Le Tubs"
<(E-Mail Removed)> 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.


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Web Garden and multithreading query techie ASP .Net 9 09-06-2005 08:43 PM
HttpModule multithreading and request and response corelation =?Utf-8?B?U2hhcGlybw==?= ASP .Net 7 12-08-2004 01:41 PM
Multithreading and Sessions Imran ASP .Net 1 01-28-2004 02:24 AM
Session State does not Work with Multithreading and SQL Server - Bug??? Ilia ASP .Net 6 11-04-2003 03:55 PM
multithreading and member-functions Ilia Poliakov C++ 16 09-05-2003 08:42 AM



Advertisments