diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-09-23 17:50:31 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-09-23 17:50:31 +0100 |
| commit | e89fb9d81358b51ed0e231725f7fb6eb63f96c5b (patch) | |
| tree | 7388764fb11b97f33c2ab9ffe8cea0679ce20d2e /src/lib/server.h | |
| parent | 6726393a4b186333b8e1080f3f1c5c4b77d4c2e6 (diff) | |
Use io_service per thread.
Diffstat (limited to 'src/lib/server.h')
| -rw-r--r-- | src/lib/server.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/lib/server.h b/src/lib/server.h index 747081443..4cb6f2563 100644 --- a/src/lib/server.h +++ b/src/lib/server.h @@ -28,6 +28,8 @@ #include <boost/thread/condition.hpp> #include "log.h" +class DeadlineWrapper; + /** @class ServerDescription * @brief Class to describe a server to which we can send encoding work. */ @@ -80,11 +82,10 @@ public: private: void worker_thread (); - int process (boost::shared_ptr<boost::asio::ip::tcp::socket> socket); + int process (boost::shared_ptr<DeadlineWrapper> wrapper); - boost::asio::io_service _io_service; std::vector<boost::thread *> _worker_threads; - std::list<boost::shared_ptr<boost::asio::ip::tcp::socket> > _queue; + std::list<boost::shared_ptr<DeadlineWrapper> > _queue; boost::mutex _worker_mutex; boost::condition _worker_condition; Log* _log; |
