summaryrefslogtreecommitdiff
path: root/src/env.h
diff options
context:
space:
mode:
authorJames M Snell <jasnell@gmail.com>2018-06-10 15:12:11 -0700
committerJames M Snell <jasnell@gmail.com>2018-06-15 09:14:19 -0700
commita24b691c6cfb31bc77f5d0cd64596106dc21d890 (patch)
tree5d83cd297efebb016e27e90cf9e670f6af666af9 /src/env.h
parentb55f6a0f010da7f2f812b0956283a1d58ebe1ff1 (diff)
downloadandroid-node-v8-a24b691c6cfb31bc77f5d0cd64596106dc21d890.tar.gz
android-node-v8-a24b691c6cfb31bc77f5d0cd64596106dc21d890.tar.bz2
android-node-v8-a24b691c6cfb31bc77f5d0cd64596106dc21d890.zip
workers,trace_events: set thread name for workers
Set the thread name for workers in trace events. Also, use uint64_t for thread_id_ because there's really no reason for those to be doubles PR-URL: https://github.com/nodejs/node/pull/21246 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com> Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Diffstat (limited to 'src/env.h')
-rw-r--r--src/env.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/env.h b/src/env.h
index 1a96abe106..786f0846f4 100644
--- a/src/env.h
+++ b/src/env.h
@@ -726,8 +726,8 @@ class Environment {
bool is_stopping_worker() const;
inline bool is_main_thread() const;
- inline double thread_id() const;
- inline void set_thread_id(double id);
+ inline uint64_t thread_id() const;
+ inline void set_thread_id(uint64_t id);
inline worker::Worker* worker_context() const;
inline void set_worker_context(worker::Worker* context);
inline void add_sub_worker_context(worker::Worker* context);
@@ -881,7 +881,7 @@ class Environment {
std::unordered_map<std::string, uint64_t> performance_marks_;
bool can_call_into_js_ = true;
- double thread_id_ = 0;
+ uint64_t thread_id_ = 0;
std::unordered_set<worker::Worker*> sub_worker_contexts_;