Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Coffee corner » Sharing and Locking
Re: Sharing and Locking [message #25678 is a reply to message #25676] Sun, 07 March 2010 16:38 Go to previous messageGo to previous message
gridem is currently offline  gridem
Messages: 45
Registered: August 2008
Member
Mirek, thank you for your answer.
luzr wrote on Sun, 07 March 2010 16:40


1) Ptr and Pte are VERY different beasts as compared to shared_ptr (but you probably know that).


Yes, it different but tries to solve the same kind of problems IMO. I think that shared_ptr has more cleared semantics than Pte/Ptr. May be the reason of this is that I used shared_ptr a lot before and try to use Pte/Ptr like shared_ptr.
luzr wrote on Sun, 07 March 2010 16:40


2) They DO use atomic operations, therefore within its modus operandi, they are completely MT safe (as is or should be the whole U++ now).

Mirek


So I mean that Pte uses Mutex (more precisely, StaticMutex) and in general it can have some problems in high concurency application. Lock-free implementation like atomic operations produces better performance results in general.

The original problem starts from the task to provide the cache in high-loaded service with limited amount of memory.

[Updated on: Sun, 07 March 2010 20:00]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Windows 7 - long wait after app crash
Next Topic: Upp application and CPU on Linux
Goto Forum:
  


Current Time: Wed May 15 09:44:48 CEST 2024

Total time taken to generate the page: 0.02107 seconds