projects
/
dcpomatic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge master.
[dcpomatic.git]
/
src
/
lib
/
server.cc
diff --git
a/src/lib/server.cc
b/src/lib/server.cc
index 66ee2b0e3cf2ca93eeb7512a03763c2598836dcc..fe792e307424501b2c8a6df845c4b202f01d1504 100644
(file)
--- a/
src/lib/server.cc
+++ b/
src/lib/server.cc
@@
-79,7
+79,7
@@
Server::~Server ()
{
boost::mutex::scoped_lock lm (_worker_mutex);
_terminate = true;
{
boost::mutex::scoped_lock lm (_worker_mutex);
_terminate = true;
- _
worker
_condition.notify_all ();
+ _
empty
_condition.notify_all ();
}
for (vector<boost::thread*>::iterator i = _worker_threads.begin(); i != _worker_threads.end(); ++i) {
}
for (vector<boost::thread*>::iterator i = _worker_threads.begin(); i != _worker_threads.end(); ++i) {
@@
-139,7
+139,7
@@
Server::worker_thread ()
while (1) {
boost::mutex::scoped_lock lock (_worker_mutex);
while (_queue.empty () && !_terminate) {
while (1) {
boost::mutex::scoped_lock lock (_worker_mutex);
while (_queue.empty () && !_terminate) {
- _
worker
_condition.wait (lock);
+ _
empty
_condition.wait (lock);
}
if (_terminate) {
}
if (_terminate) {
@@
-194,7
+194,7
@@
Server::worker_thread ()
LOG_GENERAL_NC (message.str ());
}
LOG_GENERAL_NC (message.str ());
}
- _
worker
_condition.notify_all ();
+ _
full
_condition.notify_all ();
}
}
}
}
@@
-291,11
+291,11
@@
Server::handle_accept (shared_ptr<Socket> socket, boost::system::error_code cons
/* Wait until the queue has gone down a bit */
while (_queue.size() >= _worker_threads.size() * 2 && !_terminate) {
/* Wait until the queue has gone down a bit */
while (_queue.size() >= _worker_threads.size() * 2 && !_terminate) {
- _
worker
_condition.wait (lock);
+ _
full
_condition.wait (lock);
}
_queue.push_back (socket);
}
_queue.push_back (socket);
- _
worker
_condition.notify_all ();
+ _
empty
_condition.notify_all ();
start_accept ();
}
start_accept ();
}