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 » U++ Library support » U++ Core » Critical section in PteBase::PtrAdd
Critical section in PteBase::PtrAdd [message #45828] Mon, 11 January 2016 12:18 Go to previous message
qapko is currently offline  qapko
Messages: 55
Registered: October 2007
Location: Slovakia
Member
Hello,

out of curiosity I have studied the implementation of Ptr template and noticed, that in PteBase::PtrAdd the critical section sPteLock is leaved at the beginning of the else block, just before writing to "prec" and its subitems. Is it OK? If yes, why? At first glance I would suppose, that because of some risk of race condition here, the sPteLock should be leaved at the end of the else block. Am I missing something?

Gabi
 
Read Message
Read Message
Read Message
Previous Topic: Print to desired configured printer without dialog
Next Topic: Time in milliseconds
Goto Forum:
  


Current Time: Thu Apr 25 12:36:58 CEST 2024

Total time taken to generate the page: 0.03898 seconds