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

Unified Diff: src/Thread.h

Issue 10105002: Add Sleep and Lock utilities (Closed)
Patch Set: Created April 4, 2013, 5:34 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 | « no previous file | src/Thread.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/Thread.h
===================================================================
--- a/src/Thread.h
+++ b/src/Thread.h
@@ -9,6 +9,8 @@
namespace AdblockPlus
{
+ void Sleep(const int millis);
+
class Mutex
{
public:
@@ -24,6 +26,16 @@
void Unlock();
};
+ class Lock
+ {
+ public:
+ Lock(Mutex& mutex);
+ ~Lock();
+
+ private:
+ Mutex& mutex;
+ };
+
class ConditionVariable
{
public:
« no previous file with comments | « no previous file | src/Thread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld