_player_video_connection = _player->Video.connect (bind (&Butler::video, this, _1, _2));
_player_audio_connection = _player->Audio.connect (bind (&Butler::audio, this, _1));
_thread = new boost::thread (bind (&Butler::thread, this));
+#ifdef DCPOMATIC_LINUX
+ pthread_setname_np (_thread->native_handle(), "butler");
+#endif
/* Create some threads to do work on the PlayerVideos we are creating; at present this is used to
multi-thread JPEG2000 decoding.
}
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 ();
}
{
_search_thread = new boost::thread (boost::bind (&EncodeServerFinder::search_thread, this));
_listen_thread = new boost::thread (boost::bind (&EncodeServerFinder::listen_thread, this));
+#ifdef DCPOMATIC_LINUX
+ pthread_setname_np (_search_thread->native_handle(), "encode-server-search");
+ pthread_setname_np (_listen_thread->native_handle(), "encode-server-listen");
+#endif
}
if (!Config::instance()->only_servers_encode ()) {
for (int i = 0; i < Config::instance()->master_encoding_threads (); ++i) {
boost::thread* t = new boost::thread (boost::bind (&J2KEncoder::encoder_thread, this, optional<EncodeServerDescription> ()));
+#ifdef DCPOMATIC_LINUX
+ pthread_setname_np (t->native_handle(), "encode-worker");
+#endif
_threads.push_back (t);
#ifdef BOOST_THREAD_PLATFORM_WIN32
if (windows_xp) {
_start_time = time (0);
_sub_start_time = time (0);
_thread = new boost::thread (boost::bind (&Job::run_wrapper, this));
+#ifdef DCPOMATIC_LINUX
+ pthread_setname_np (_thread->native_handle(), "job-wrapper");
+#endif
}
/** A wrapper for the ::run() method to catch exceptions */
JobManager::start ()
{
_scheduler = new boost::thread (boost::bind (&JobManager::scheduler, this));
+#ifdef DCPOMATIC_LINUX
+ pthread_setname_np (_scheduler->native_handle(), "job-scheduler");
+#endif
}
JobManager::~JobManager ()
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
UpdateChecker::start ()
{
_thread = new boost::thread (boost::bind (&UpdateChecker::thread, this));
+#ifdef DCPOMATIC_LINUX
+ pthread_setname_np (_thread->native_handle(), "update-checker");
+#endif
}
UpdateChecker::~UpdateChecker ()
Writer::start ()
{
_thread = new boost::thread (boost::bind (&Writer::thread, this));
+#ifdef DCPOMATIC_LINUX
+ pthread_setname_np (_thread->native_handle(), "writer");
+#endif
}
Writer::~Writer ()
delete[] accel;
UpdateChecker::instance()->StateChanged.connect (boost::bind (&DOMFrame::update_checker_state_changed, this));
+
+#ifdef DCPOMATIC_LINUX
+ pthread_setname_np(pthread_self(), "gui");
+#endif
}
void remove_clicked (wxCommandEvent& ev)