From c450fb19ea21dba0a6cade81e829262e7078e9df Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Wed, 19 Aug 2015 00:21:43 +0100 Subject: Add only-servers-encode option for debugging / optimisation / testing of servers. --- src/lib/encoder.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/lib/encoder.cc') diff --git a/src/lib/encoder.cc b/src/lib/encoder.cc index 09788d3fa..917f313a2 100644 --- a/src/lib/encoder.cc +++ b/src/lib/encoder.cc @@ -89,8 +89,10 @@ Encoder::add_worker_threads (ServerDescription d) void Encoder::begin () { - for (int i = 0; i < Config::instance()->num_local_encoding_threads (); ++i) { - _threads.push_back (new boost::thread (boost::bind (&Encoder::encoder_thread, this, optional ()))); + if (!Config::instance()->only_servers_encode ()) { + for (int i = 0; i < Config::instance()->num_local_encoding_threads (); ++i) { + _threads.push_back (new boost::thread (boost::bind (&Encoder::encoder_thread, this, optional ()))); + } } _writer->set_encoder_threads (_threads.size ()); -- cgit v1.2.3