473,382 Members | 1,784 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,382 software developers and data experts.

CObList

Are CObList and CPtrList protected against concurrent access by
multiple threads? I presume the answer is "no". If one thread is in the
process of changing the list, e.g., Add Head, RemoveTail, etc., and
some other thread barges in to review the list, there is a potential
for the latter thread to sustain a memory violation, correct? A mutex
must be created for all threads to use when accessing the object,
correct?

May 8 '06 #1
2 2948
Frank Natoli wrote:
Are CObList and CPtrList protected against concurrent access by
multiple threads? I presume the answer is "no". If one thread is in the
process of changing the list, e.g., Add Head, RemoveTail, etc., and
some other thread barges in to review the list, there is a potential
for the latter thread to sustain a memory violation, correct? A mutex
must be created for all threads to use when accessing the object,
correct?


CObList and CPtrList are not standard C++, and standard C++ doesn't
have built-in threading support (though it's a good possibility in
C++09). Hence, you should ask your question in a newsgroup related to
your platform (which, BTW, you didn't even mention, which means we
would have to speculate on who the vendor of such creatures is before
we could even attempt to give an accurate answer). See this FAQ for
what is on-topic here and for some suggestions of where you can post
your question:

http://www.parashift.com/c++-faq-lit...t.html#faq-5.9

Cheers! --M

May 8 '06 #2

"Frank Natoli" <Fr**********@Earthlink.net> wrote in message
news:11**********************@e56g2000cwe.googlegr oups.com...
Are CObList and CPtrList protected against concurrent access by
multiple threads? I presume the answer is "no". If one thread is in the
process of changing the list, e.g., Add Head, RemoveTail, etc., and
some other thread barges in to review the list, there is a potential
for the latter thread to sustain a memory violation, correct? A mutex
must be created for all threads to use when accessing the object,
correct?


None of 'CObList', 'CPtrList', 'concurrent access', 'threads', or
'mutex' are defined by the standard C++ language, so there's no
answer in the context of this newsgroup. Try a group where those
things are topical. A guess: 'CObList' and CPtrList' look to me
like Microsoft's MFC types. If so, an MFC group is where to ask.
(You can find a list of Microsoft-specific newsgroups at
www.msdn.microsoft.com

Purpose of comp.lang.c++:
http://www.slack.net/~shiva/welcome.txt
-Mike
May 8 '06 #3

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

Similar topics

8
by: Russ | last post by:
Hello. I have a very large business application written all in VC++ and MFC. Now I want to interface some of it to the web. I have VS.NET2003 and have been studing walkthroughs and documentation...
6
by: Ben Taylor | last post by:
I've asked about includes before in this group in order to stop files being #included either twice or not at all, and somebody said to use extern keyword for global variables that need to be used...
0
by: Gordon | last post by:
Hello there. I am attempting to move some working code to VC++ .Net2003. The problem I have is with a structure (base class CObList) that I use for a simple linked. It will not even compile in...
3
by: Leith Bade | last post by:
I have been trying to use the new Visual C++ Toolkit 2003 with the VC6 IDE I set up the executable, inlcude, and library directories to point to the new compilers I had to fix a few errors in the...
2
by: Lauro | last post by:
I'm starting whit C++, so I don't andestand too much about . I would like to know how can I inherit a generic class fron CObjet class, all the time I try I recibe a message telling that CObjet...
3
by: Greg Horwood | last post by:
Dear All, I need to create a dynamic array (linked list) of a data structure. In the old days I would have used a C++ list class, or an MFC COblist class, and used it to manage the structure...
2
by: deneb.dizajn | last post by:
I'm writing this sorting just to understand how exactly works methods in CObList. Iteration works fine, but it won't change pointers. CObList myList; CPerson* first, second; POSITION next,...
1
bajajv
by: bajajv | last post by:
Hi, What is the difference between CObList and CList? If we use a CList as - CList<CObject*, CObject*>, isnt it similar to CObList?
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
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.