-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscriptdog.h
More file actions
32 lines (26 loc) · 718 Bytes
/
scriptdog.h
File metadata and controls
32 lines (26 loc) · 718 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <v8.h>
#include <node.h>
#include <node_version.h>
#include <uv.h>
using namespace node;
using namespace v8;
class Scriptdog : public ObjectWrap {
public:
static void Initialize(Handle<Object> target);
private:
Scriptdog(int64_t timeout);
Scriptdog(const Scriptdog&);
Scriptdog& operator=(const Scriptdog&);
~Scriptdog();
uv_thread_t d_thread;
uv_loop_t *d_loop;
uv_timer_t d_timer;
int64_t d_timeout;
bool d_created;
bool d_destroyed;
void Destroy();
static void Run(void *arg);
static Handle<Value> New(const Arguments& args);
static Handle<Value> Dispose(const Arguments& args);
static void Timer(uv_timer_t *timer, int status);
};