maps and threads 
Author Message
 maps and threads

Are there any known problems with VC C++ 6.0 maps used in
a multi-threaded environment?  Any information or
knowledge base article names would be appreciated.

Thanks,
James



Tue, 12 Apr 2005 10:51:26 GMT  
 maps and threads


Quote:
>Are there any known problems with VC C++ 6.0 maps used in
>a multi-threaded environment?  Any information or
>knowledge base article names would be appreciated.

AFAIK, they don't work at all unless you apply the fixes at
www.dinkumware.com/vc_fixes.html . In addition, you need to perform
locking yourself. If any thread is writing to the map, nothing else
must read from it or write to it.

Tom



Tue, 12 Apr 2005 16:55:12 GMT  
 maps and threads

Quote:
> Are there any known problems with VC C++ 6.0 maps used in
> a multi-threaded environment?  Any information or
> knowledge base article names would be appreciated.

Nothing, unless you provide appropriate synchronization on writes.  An STL
container is safe for multithreading until a write operation is being
performed, where you should provide proper synchronization.

--

Ehsan Akhgari



[WWW: http://www.beginthread.com/Ehsan ]



Tue, 12 Apr 2005 20:15:25 GMT  
 maps and threads
Ahhh, you say that the map does not work at all unless the
dinkumware fix is applied.  I looked in the fixed section
that you mentioned and found there is a patch for
<xtree>.  I assume this is the fix you are refering to.  
Although, you probably mean the whole dinkumware library
upgrade.  I noticed in the source code supplied by
dinkumware for the <xtree> fix that the header comment
only refers to VC 5.0.  So, now I am wowndering if you are
refering to a different fix?

Regards,
James

Quote:
>-----Original Message-----
>On Thu, 24 Oct 2002 19:51:26 -0700, "James"


Quote:

>>Are there any known problems with VC C++ 6.0 maps used
in
>>a multi-threaded environment?  Any information or
>>knowledge base article names would be appreciated.

>AFAIK, they don't work at all unless you apply the fixes
at
>www.dinkumware.com/vc_fixes.html . In addition, you need
to perform
>locking yourself. If any thread is writing to the map,
nothing else
>must read from it or write to it.

>Tom
>.



Thu, 14 Apr 2005 10:05:41 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. question about use of map in threads

2. Is STL map::find thread safe?

3. map.find thread safe ?

4. Thread safe Map

5. Thread safe Map

6. Thread safe hash or map class?

7. Threads and Message Maps.

8. Thread handle maps

9. Multi-threading and threadstate handle maps

10. How to access other thread's message maps

11. Thread handles and the message map

12. Thread Safe Map

 

 
Powered by phpBB® Forum Software