comparison: src/server/util/thrpool.h
src/server/util/thrpool.h
- changeset 569
- 70bca6190669
- parent 556
- b036ccad4b49
- child 570
- f95868a8ec37
equal
deleted
inserted
replaced
29 #ifndef THREADPOOL_H |
29 #ifndef THREADPOOL_H |
30 #define THREADPOOL_H |
30 #define THREADPOOL_H |
31 |
31 |
32 #include "../public/nsapi.h" |
32 #include "../public/nsapi.h" |
33 #include <pthread.h> |
33 #include <pthread.h> |
|
34 #include <time.h> |
34 |
35 |
35 #ifdef __cplusplus |
36 #ifdef __cplusplus |
36 extern "C" { |
37 extern "C" { |
37 #endif |
38 #endif |
38 |
39 |
45 uint32_t queue_len; |
46 uint32_t queue_len; |
46 uint32_t num_idle; |
47 uint32_t num_idle; |
47 uint32_t num_threads; |
48 uint32_t num_threads; |
48 int min_threads; |
49 int min_threads; |
49 int max_threads; |
50 int max_threads; |
|
51 pthread_t *threads; |
|
52 int *thrstatus; |
|
53 time_t last_job; |
|
54 int last_thread; |
50 }; |
55 }; |
51 |
56 |
52 struct _threadpool_job { |
57 struct _threadpool_job { |
53 job_callback_f callback; |
58 job_callback_f callback; |
54 void *data; |
59 void *data; |