forked from lynckia/licode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathThreadPool.h
45 lines (37 loc) · 984 Bytes
/
ThreadPool.h
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
33
34
35
36
37
38
39
40
41
42
43
44
45
#ifndef ERIZOAPI_THREADPOOL_H_
#define ERIZOAPI_THREADPOOL_H_
#include <nan.h>
#include <thread/ThreadPool.h>
/*
* Wrapper class of erizo::ThreadPool
*
* Represents a OneToMany connection.
* Receives media from one publisher and retransmits it to every subscriber.
*/
class ThreadPool : public Nan::ObjectWrap {
public:
static NAN_MODULE_INIT(Init);
std::unique_ptr<erizo::ThreadPool> me;
private:
ThreadPool();
~ThreadPool();
/*
* Constructor.
* Constructs a ThreadPool
*/
static NAN_METHOD(New);
/*
* Closes the ThreadPool.
* The object cannot be used after this call
*/
static NAN_METHOD(close);
/*
* Starts all workers in the ThreadPool
*/
static NAN_METHOD(start);
static NAN_METHOD(getDurationDistribution);
static NAN_METHOD(getDelayDistribution);
static NAN_METHOD(resetStats);
static Nan::Persistent<v8::Function> constructor;
};
#endif // ERIZOAPI_THREADPOOL_H_