Home » U++ Library support » U++ Core » Critical section in PteBase::PtrAdd
Critical section in PteBase::PtrAdd [message #45828] |
Mon, 11 January 2016 12:18 |
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
|
|
|
Goto Forum:
Current Time: Thu Apr 25 12:36:58 CEST 2024
Total time taken to generate the page: 0.03898 seconds
|