473,377 Members | 1,151 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,377 software developers and data experts.

c++ and multithreading

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

Dec 13 '05 #1
4 1980

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

Dec 13 '05 #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?

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

Dec 13 '05 #3
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
Dec 13 '05 #4
On 13 Dec 2005 07:06:02 -0800 in comp.lang.c++, "Le Tubs"
<dl*****@yahoo.co.uk> 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.
Dec 13 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: dixp | last post by:
I'm new to writing multithreaded apps and I have a design question. I have a winforms app and a class which has a method that does processing which is time intensive. I want the user to be able...
47
by: mihai | last post by:
What does the standard say about those two? Is any assurance that the use of STL is thread safe? Have a nice day, Mihai.
16
by: Robert Zurer | last post by:
Can anyone suggest the best book or part of a book on this subject. I'm looking for an in-depth treatment with examples in C# TIA Robert Zurer robert@zurer.com
5
by: sarge | last post by:
I would like to know how to perform simple multithreading. I had created a simple form to test out if I was multithreading properly, but got buggy results. Sometime the whole thig would lock up...
9
by: tommy | last post by:
hi, i have found a example for multithreading and asp.net http://www.fawcette.com/vsm/2002_11/magazine/features/chester/ i want to speed up my website ... if my website is starting, they...
2
by: Rich | last post by:
Hello, I have set up a multithreading routine in a Test VB.net proj, and it appears to be working OK in debug mode and I am not using synchronization. Multithreading is a new thing for me, and...
55
by: Sam | last post by:
Hi, I have a serious issue using multithreading. A sample application showing my issue can be downloaded here: http://graphicsxp.free.fr/WindowsApplication11.zip The problem is that I need to...
5
by: sandy82 | last post by:
Whats actuallly multithreading is ... and how threading and multithreading differ . Can any1 guide how multithreading is used on the Web .. i mean a practical scenario in which u use...
2
by: Pradnya Patil | last post by:
hi , I am trying to draw ' html div-tag ' on the screen which will resemble a rectangle through vb.net code. I want it to be drawn faster...so I introduced multithreading using Threadpool. I...
7
by: Ray | last post by:
Hello, Greetings! I'm looking for a solid C++ multithreading book. Can you recommend one? I don't think I've seen a multithreading C++ book that everybody thinks is good (like Effective C++ or...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.