summaryrefslogtreecommitdiff
path: root/src/lib/encoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2015-08-19 00:21:43 +0100
committerCarl Hetherington <cth@carlh.net>2015-08-19 00:21:43 +0100
commitc450fb19ea21dba0a6cade81e829262e7078e9df (patch)
treec6876bb2b4d4ac52223848dc47b58f75dbe49744 /src/lib/encoder.cc
parentbe0899b93837bf8929282d85aa90f5390ba17755 (diff)
Add only-servers-encode option for debugging / optimisation / testing of servers.
Diffstat (limited to 'src/lib/encoder.cc')
-rw-r--r--src/lib/encoder.cc6
1 files changed, 4 insertions, 2 deletions
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<ServerDescription> ())));
+ 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<ServerDescription> ())));
+ }
}
_writer->set_encoder_threads (_threads.size ());