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

Unified Diff: src/Thread.h

Issue 29367003: Issue #4711 - Rewrite legacy thread facilities
Patch Set: Created Dec. 7, 2016, 4:44 p.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
« src/Scheduler.cpp ('K') | « src/Scheduler.cpp ('k') | src/Thread.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/Thread.h
===================================================================
deleted file mode 100644
--- a/src/Thread.h
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * This file is part of Adblock Plus <https://adblockplus.org/>,
- * Copyright (C) 2006-2016 Eyeo GmbH
- *
- * Adblock Plus is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 3 as
- * published by the Free Software Foundation.
- *
- * Adblock Plus is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Adblock Plus. If not, see <http://www.gnu.org/licenses/>.
- */
-
-#ifndef ADBLOCKPLUS_THREAD_H
-#define ADBLOCKPLUS_THREAD_H
-
-#ifdef WIN32
-#include <windows.h>
-#else
-#include <pthread.h>
-#endif
-
-namespace AdblockPlus
-{
- void Sleep(const int millis);
-
- class Mutex
Eric 2016/12/07 18:06:25 Class was unused except in tests.
- {
- public:
-#ifdef WIN32
- CRITICAL_SECTION nativeMutex;
-#else
- pthread_mutex_t nativeMutex;
-#endif
-
- Mutex();
- ~Mutex();
- void Lock();
- void Unlock();
- };
-
- class Lock
Eric 2016/12/07 18:06:25 Class was unused except in tests.
- {
- public:
- Lock(Mutex& mutex);
- ~Lock();
-
- private:
- Mutex& mutex;
- };
-
- class Thread
- {
- public:
- explicit Thread(bool deleteSelfOnFinish = false);
- virtual ~Thread();
- virtual void Run() = 0;
- void Start();
- void Join();
Eric 2016/12/07 18:06:25 Function was unused except in tests.
- private:
- static void CallRun(Thread* thread);
- private:
-#ifdef WIN32
- HANDLE nativeThread;
-#else
- pthread_t nativeThread;
-#endif
- bool m_deleteSelfOnFinish;
- };
-}
-
-#endif
« src/Scheduler.cpp ('K') | « src/Scheduler.cpp ('k') | src/Thread.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld