This file contains hidden or 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
void receive_request(const FunctionCallbackInfo<Value>& args) { | |
unsigned int priority; | |
double msg; | |
boost::interprocess::message_queue::size_type recvd_size; | |
message_queue_request_->receive(&msg, sizeof(msg), recvd_size, priority); | |
auto* isolate = args.GetIsolate(); | |
args.GetReturnValue().Set(Number::New(isolate, msg)); | |
} | |
void send_response(const FunctionCallbackInfo<Value>& args) { |
This file contains hidden or 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
/* | |
* Hypnotic can be extended | |
* Here we have a simple semaphore introduced | |
* which supports only one producer/consumer | |
*/ | |
// jQuery still works, of course! | |
function print(msg){ $('#output').html(msg); } | |
/* |