Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/shared/Utils.h

Issue 11012013: Hanging resolved (critical sections unlocking) (Closed)
Patch Set: Comments addressed Created June 25, 2013, 11:56 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/shared/CriticalSection.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/shared/Utils.h
===================================================================
--- a/src/shared/Utils.h
+++ b/src/shared/Utils.h
@@ -25,43 +25,4 @@
return trimmed;
}
-namespace
-{
- class CriticalSection
- {
- public:
- CriticalSection()
- {
- InitializeCriticalSection(&section);
- }
-
- ~CriticalSection()
- {
- DeleteCriticalSection(&section);
- }
-
- class Lock
- {
- public:
- Lock(CriticalSection& cs)
- : section(&cs.section)
- {
- EnterCriticalSection(section);
- }
-
- ~Lock()
- {
- LeaveCriticalSection(section);
- }
- private:
- LPCRITICAL_SECTION section;
- Lock(const Lock&);
- Lock& operator=(const Lock&);
- };
- private:
- CRITICAL_SECTION section;
- CriticalSection(const CriticalSection&);
- CriticalSection& operator=(const CriticalSection&);
- };
-}
#endif // UTILS_H
« no previous file with comments | « src/shared/CriticalSection.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld