mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Get rid of Executor.cpp/h.
There was only one implementation.
This commit is contained in:
parent
446c2c027e
commit
1b0ac23a69
6 changed files with 9 additions and 16 deletions
|
@ -529,7 +529,6 @@
|
||||||
<ClInclude Include="System\System.h" />
|
<ClInclude Include="System\System.h" />
|
||||||
<ClInclude Include="Thread\Channel.h" />
|
<ClInclude Include="Thread\Channel.h" />
|
||||||
<ClInclude Include="Thread\Event.h" />
|
<ClInclude Include="Thread\Event.h" />
|
||||||
<ClInclude Include="Thread\Executor.h" />
|
|
||||||
<ClInclude Include="Thread\ParallelLoop.h" />
|
<ClInclude Include="Thread\ParallelLoop.h" />
|
||||||
<ClInclude Include="Thread\Promise.h" />
|
<ClInclude Include="Thread\Promise.h" />
|
||||||
<ClInclude Include="Thread\ThreadManager.h" />
|
<ClInclude Include="Thread\ThreadManager.h" />
|
||||||
|
|
|
@ -33,14 +33,18 @@
|
||||||
|
|
||||||
#include <cstdio>
|
#include <cstdio>
|
||||||
#include <cstdlib>
|
#include <cstdlib>
|
||||||
|
#include <thread>
|
||||||
|
|
||||||
#include "Common/Net/HTTPServer.h"
|
#include "Common/Net/HTTPServer.h"
|
||||||
#include "Common/Net/NetBuffer.h"
|
#include "Common/Net/NetBuffer.h"
|
||||||
#include "Common/Net/Sinks.h"
|
#include "Common/Net/Sinks.h"
|
||||||
#include "Common/File/FileDescriptor.h"
|
#include "Common/File/FileDescriptor.h"
|
||||||
|
|
||||||
|
#include "Common/Buffer.h"
|
||||||
#include "Common/Log.h"
|
#include "Common/Log.h"
|
||||||
|
|
||||||
void NewThreadExecutor::Run(std::function<void()> &&func) {
|
|
||||||
|
void NewThreadExecutor::Run(std::function<void()> func) {
|
||||||
threads_.push_back(std::thread(func));
|
threads_.push_back(std::thread(func));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,16 +10,18 @@
|
||||||
class NewThreadExecutor {
|
class NewThreadExecutor {
|
||||||
public:
|
public:
|
||||||
~NewThreadExecutor();
|
~NewThreadExecutor();
|
||||||
void Run(std::function<void()> &&func);
|
void Run(std::function<void()> func);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::vector<std::thread> threads_;
|
std::vector<std::thread> threads_;
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace net {
|
namespace net {
|
||||||
|
|
||||||
class InputSink;
|
class InputSink;
|
||||||
class OutputSink;
|
class OutputSink;
|
||||||
};
|
|
||||||
|
} // namespace net
|
||||||
|
|
||||||
namespace http {
|
namespace http {
|
||||||
|
|
||||||
|
|
|
@ -486,7 +486,6 @@
|
||||||
<ClInclude Include="..\..\Common\System\Display.h" />
|
<ClInclude Include="..\..\Common\System\Display.h" />
|
||||||
<ClInclude Include="..\..\Common\System\NativeApp.h" />
|
<ClInclude Include="..\..\Common\System\NativeApp.h" />
|
||||||
<ClInclude Include="..\..\Common\System\System.h" />
|
<ClInclude Include="..\..\Common\System\System.h" />
|
||||||
<ClInclude Include="..\..\Common\Thread\Executor.h" />
|
|
||||||
<ClInclude Include="..\..\Common\Thread\Channel.h" />
|
<ClInclude Include="..\..\Common\Thread\Channel.h" />
|
||||||
<ClInclude Include="..\..\Common\Thread\Promise.h" />
|
<ClInclude Include="..\..\Common\Thread\Promise.h" />
|
||||||
<ClInclude Include="..\..\Common\Thread\ThreadUtil.h" />
|
<ClInclude Include="..\..\Common\Thread\ThreadUtil.h" />
|
||||||
|
@ -599,7 +598,6 @@
|
||||||
<ClCompile Include="..\..\Common\OSVersion.cpp" />
|
<ClCompile Include="..\..\Common\OSVersion.cpp" />
|
||||||
<ClCompile Include="..\..\Common\StringUtils.cpp" />
|
<ClCompile Include="..\..\Common\StringUtils.cpp" />
|
||||||
<ClCompile Include="..\..\Common\System\Display.cpp" />
|
<ClCompile Include="..\..\Common\System\Display.cpp" />
|
||||||
<ClCompile Include="..\..\Common\Thread\Executor.cpp" />
|
|
||||||
<ClCompile Include="..\..\Common\Thread\ThreadUtil.cpp" />
|
<ClCompile Include="..\..\Common\Thread\ThreadUtil.cpp" />
|
||||||
<ClCompile Include="..\..\Common\Thread\ThreadManager.cpp" />
|
<ClCompile Include="..\..\Common\Thread\ThreadManager.cpp" />
|
||||||
<ClCompile Include="..\..\Common\Thread\ParallelLoop.cpp" />
|
<ClCompile Include="..\..\Common\Thread\ParallelLoop.cpp" />
|
||||||
|
|
|
@ -180,9 +180,6 @@
|
||||||
<ClCompile Include="..\..\Common\Input\InputState.cpp">
|
<ClCompile Include="..\..\Common\Input\InputState.cpp">
|
||||||
<Filter>Input</Filter>
|
<Filter>Input</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
<ClCompile Include="..\..\Common\Thread\Executor.cpp">
|
|
||||||
<Filter>Thread</Filter>
|
|
||||||
</ClCompile>
|
|
||||||
<ClCompile Include="..\..\Common\Thread\ThreadManager.cpp">
|
<ClCompile Include="..\..\Common\Thread\ThreadManager.cpp">
|
||||||
<Filter>Thread</Filter>
|
<Filter>Thread</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
@ -460,9 +457,6 @@
|
||||||
<ClInclude Include="..\..\Common\Input\KeyCodes.h">
|
<ClInclude Include="..\..\Common\Input\KeyCodes.h">
|
||||||
<Filter>Input</Filter>
|
<Filter>Input</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
<ClInclude Include="..\..\Common\Thread\Executor.h">
|
|
||||||
<Filter>Thread</Filter>
|
|
||||||
</ClInclude>
|
|
||||||
<ClInclude Include="..\..\Common\Thread\Channel.h">
|
<ClInclude Include="..\..\Common\Thread\Channel.h">
|
||||||
<Filter>Thread</Filter>
|
<Filter>Thread</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
|
|
@ -285,11 +285,7 @@ EXEC_AND_LIB_FILES := \
|
||||||
$(SRC)/Common/Net/WebsocketServer.cpp \
|
$(SRC)/Common/Net/WebsocketServer.cpp \
|
||||||
$(SRC)/Common/Profiler/Profiler.cpp \
|
$(SRC)/Common/Profiler/Profiler.cpp \
|
||||||
$(SRC)/Common/System/Display.cpp \
|
$(SRC)/Common/System/Display.cpp \
|
||||||
<<<<<<< HEAD
|
|
||||||
$(SRC)/Common/Thread/PrioritizedWorkQueue.cpp \
|
|
||||||
=======
|
|
||||||
$(SRC)/Common/Thread/Executor.cpp \
|
$(SRC)/Common/Thread/Executor.cpp \
|
||||||
>>>>>>> 82282c7a3 (Get rid of the PrioritizedWorkQueue. Instead just queue tasks on the ThreadManager.)
|
|
||||||
$(SRC)/Common/Thread/ThreadUtil.cpp \
|
$(SRC)/Common/Thread/ThreadUtil.cpp \
|
||||||
$(SRC)/Common/Thread/ThreadManager.cpp \
|
$(SRC)/Common/Thread/ThreadManager.cpp \
|
||||||
$(SRC)/Common/Thread/ParallelLoop.cpp \
|
$(SRC)/Common/Thread/ParallelLoop.cpp \
|
||||||
|
|
Loading…
Add table
Reference in a new issue