Loop::defer and almost working async streaming
This commit is contained in:
@@ -1,8 +1,19 @@
|
||||
#ifndef LOOPDATA_H
|
||||
#define LOOPDATA_H
|
||||
|
||||
#include <thread>
|
||||
#include <functional>
|
||||
#include <vector>
|
||||
#include <mutex>
|
||||
|
||||
namespace uWS {
|
||||
|
||||
struct LoopData {
|
||||
friend struct Loop;
|
||||
private:
|
||||
std::mutex deferMutex;
|
||||
int currentDeferQueue = 0;
|
||||
std::vector<std::function<void()>> deferQueues[2];
|
||||
|
||||
public:
|
||||
/* Good 16k for SSL perf. */
|
||||
@@ -14,4 +25,6 @@ public:
|
||||
bool corked = false;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // LOOPDATA_H
|
||||
|
||||
Reference in New Issue
Block a user