Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1152)

Unified Diff: include/utils/SkCondVar.h

Issue 444583006: SkThreadPool and co. are not public. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gyp/utils.gypi ('k') | include/utils/SkRunnable.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/utils/SkCondVar.h
diff --git a/include/utils/SkCondVar.h b/include/utils/SkCondVar.h
deleted file mode 100644
index 6f18e1a651df9e0443d00f1a6f3ba9ae9461e5c9..0000000000000000000000000000000000000000
--- a/include/utils/SkCondVar.h
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Copyright 2012 Google Inc.
- *
- * Use of this source code is governed by a BSD-style license that can be
- * found in the LICENSE file.
- */
-
-#ifndef SkCondVar_DEFINED
-#define SkCondVar_DEFINED
-
-/**
- * Import any thread model setting from configuration files.
- */
-#include "SkTypes.h"
-
-#ifdef SK_USE_POSIX_THREADS
-#include <pthread.h>
-#elif defined(SK_BUILD_FOR_WIN32)
-#include <windows.h>
-#else
-/**
- * Warn if the implementation of this class is empty, i.e. thread safety is not working.
- */
-#warning "Thread safety class SkCondVar has no implementation!"
-#endif
-
-/**
- * Condition variable for blocking access to shared data from other threads and
- * controlling which threads are awake.
- *
- * Currently only supported on platforms with posix threads and Windows Vista and
- * above.
- */
-class SkCondVar {
-public:
- SkCondVar();
- ~SkCondVar();
-
- /**
- * Lock a mutex. Must be done before calling the other functions on this object.
- */
- void lock();
-
- /**
- * Unlock the mutex.
- */
- void unlock();
-
- /**
- * Pause the calling thread. Will be awoken when signal() or broadcast() is called.
- * Must be called while lock() is held (but gives it up while waiting). Once awoken,
- * the calling thread will hold the lock once again.
- */
- void wait();
-
- /**
- * Wake one thread waiting on this condition. Must be called while lock()
- * is held.
- */
- void signal();
-
- /**
- * Wake all threads waiting on this condition. Must be called while lock()
- * is held.
- */
- void broadcast();
-
-private:
-#ifdef SK_USE_POSIX_THREADS
- pthread_mutex_t fMutex;
- pthread_cond_t fCond;
-#elif defined(SK_BUILD_FOR_WIN32)
- CRITICAL_SECTION fCriticalSection;
- CONDITION_VARIABLE fCondition;
-#endif
-};
-
-#endif
« no previous file with comments | « gyp/utils.gypi ('k') | include/utils/SkRunnable.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698