diff options
| author | Carl Hetherington <cth@carlh.net> | 2018-02-16 20:24:37 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2018-02-16 20:24:37 +0000 |
| commit | 8e4a2e5ea578ac4f0f41edb6145d5c0040e33ec2 (patch) | |
| tree | c31e883dedd7166cf6267ce14a4811c71862c7a7 /src/lib/encode_server.cc | |
| parent | 8a1e5f6a6c3ea0147c687fde40110f4ec138fd9b (diff) | |
Name threads on Linux.
Diffstat (limited to 'src/lib/encode_server.cc')
| -rw-r--r-- | src/lib/encode_server.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/lib/encode_server.cc b/src/lib/encode_server.cc index 332c7ab46..26ef45d60 100644 --- a/src/lib/encode_server.cc +++ b/src/lib/encode_server.cc @@ -229,10 +229,17 @@ EncodeServer::run () } for (int i = 0; i < _num_threads; ++i) { - _worker_threads.push_back (new thread (bind (&EncodeServer::worker_thread, this))); + thread* t = new thread (bind (&EncodeServer::worker_thread, this)); +#ifdef DCPOMATIC_LINUX + pthread_setname_np (t->native_handle(), "encode-server-worker"); +#endif + _worker_threads.push_back (t); } _broadcast.thread = new thread (bind (&EncodeServer::broadcast_thread, this)); +#ifdef DCPOMATIC_LINUX + pthread_setname_np (_broadcast.thread->native_handle(), "encode-server-broadcast"); +#endif Server::run (); } |
