Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Roberts <vieuxtech@gmail.com>2019-05-22 19:42:25 +0300
committerSam Roberts <vieuxtech@gmail.com>2019-05-23 18:51:33 +0300
commit6ded4f2bad519d2c201c855b9ba87095bc29d71b (patch)
tree509c246445663d1100422911b4a0c786c16e1da8 /src/node_internals.h
parentcb1687241671732e91959c67202efa73139bd1e8 (diff)
src: move ThreadPoolWork inlines into a -inl.h
The presence of the inline definitions in node_internals.h can cause all files that include node_internals.h to depend on util-inl.h, even if they never use ThreadPoolWork. Whether this happens depends on the toolchain, gcc will strip unused definitions, clang won't. PR-URL: https://github.com/nodejs/node/pull/27755 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_internals.h')
-rw-r--r--src/node_internals.h21
1 files changed, 0 insertions, 21 deletions
diff --git a/src/node_internals.h b/src/node_internals.h
index cb039f297b1..6aba8eef5d6 100644
--- a/src/node_internals.h
+++ b/src/node_internals.h
@@ -252,27 +252,6 @@ class ThreadPoolWork {
uv_work_t work_req_;
};
-void ThreadPoolWork::ScheduleWork() {
- env_->IncreaseWaitingRequestCounter();
- int status = uv_queue_work(
- env_->event_loop(),
- &work_req_,
- [](uv_work_t* req) {
- ThreadPoolWork* self = ContainerOf(&ThreadPoolWork::work_req_, req);
- self->DoThreadPoolWork();
- },
- [](uv_work_t* req, int status) {
- ThreadPoolWork* self = ContainerOf(&ThreadPoolWork::work_req_, req);
- self->env_->DecreaseWaitingRequestCounter();
- self->AfterThreadPoolWork(status);
- });
- CHECK_EQ(status, 0);
-}
-
-int ThreadPoolWork::CancelWork() {
- return uv_cancel(reinterpret_cast<uv_req_t*>(&work_req_));
-}
-
#define TRACING_CATEGORY_NODE "node"
#define TRACING_CATEGORY_NODE1(one) \
TRACING_CATEGORY_NODE "," \