Make Loop and LoopData only hold move-only functions
This commit is contained in:
+4
-2
@@ -25,6 +25,8 @@
|
||||
|
||||
#include "PerMessageDeflate.h"
|
||||
|
||||
#include "f2/function2.hpp"
|
||||
|
||||
namespace uWS {
|
||||
|
||||
struct Loop;
|
||||
@@ -34,9 +36,9 @@ struct alignas(16) LoopData {
|
||||
private:
|
||||
std::mutex deferMutex;
|
||||
int currentDeferQueue = 0;
|
||||
std::vector<std::function<void()>> deferQueues[2];
|
||||
std::vector<fu2::unique_function<void()>> deferQueues[2];
|
||||
|
||||
std::function<void(Loop *)> postHandler, preHandler;
|
||||
fu2::unique_function<void(Loop *)> postHandler, preHandler;
|
||||
|
||||
public:
|
||||
~LoopData() {
|
||||
|
||||
Reference in New Issue
Block a user