This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "message_listener.h" | |
// This function is called in the event loop when "uv_async_send(&AW->async)" is executed in "msg_listener.h". | |
void invokeHandlers(uv_async_t *async){ | |
Isolate * isolate = Isolate::GetCurrent(); | |
v8::HandleScope handleScope(isolate); | |
// Get required data from async handler. | |
// Reference: "AW->async.data = AW;" in "listenMessage". | |
AsyncWork *work = static_cast<AsyncWork*>(async->data); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <vector> | |
#include <set> | |
#include <unordered_set> | |
#include <cassert> | |
#include <iostream> | |
using namespace std; | |
static const int tries = 10000000; | |
uint64_t rand64() { return (((uint64_t)rand())<<32) | (uint64_t)rand(); } |