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/json_server.cc | |
| parent | 8a1e5f6a6c3ea0147c687fde40110f4ec138fd9b (diff) | |
Name threads on Linux.
Diffstat (limited to 'src/lib/json_server.cc')
| -rw-r--r-- | src/lib/json_server.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/json_server.cc b/src/lib/json_server.cc index e171a6307..3f43a75eb 100644 --- a/src/lib/json_server.cc +++ b/src/lib/json_server.cc @@ -52,7 +52,10 @@ enum State { JSONServer::JSONServer (int port) { - new thread (boost::bind (&JSONServer::run, this, port)); + thread* t = new thread (boost::bind (&JSONServer::run, this, port)); +#ifdef DCPOMATIC_LINUX + pthread_setname_np (t->native_handle(), "json-server"); +#endif } void |
