Files
MapLibreParticleLab/src/thread_object.hpp
2015-02-04 18:21:39 +01:00

29 lines
686 B
C++

#pragma once
#include <node.h>
#include <nan.h>
#include <thread>
class NodeFileSource;
class ThreadObject : public node::ObjectWrap {
////////////////////////////////////////////////////////////////////////////////////////////////
// Static Node Methods
public:
static void Init(v8::Handle<v8::Object> target);
static NAN_METHOD(New);
static v8::Persistent<v8::FunctionTemplate> constructorTemplate;
////////////////////////////////////////////////////////////////////////////////////////////////
// Instance
private:
ThreadObject(NodeFileSource *fs);
~ThreadObject();
private:
std::thread thread;
v8::Persistent<v8::Object> self;
};