Fixed insignificant error in Poco, shown by TSan [#CLICKHOUSE-2].

This commit is contained in:
Alexey Milovidov 2017-09-09 07:08:04 +03:00
parent 253893bf4d
commit 2e74123075

View File

@ -28,6 +28,8 @@
#include "Poco/Thread.h"
#include "Poco/ThreadPool.h"
#include <atomic>
namespace Poco {
namespace Net {
@ -63,7 +65,7 @@ class Net_API TCPServer: public Poco::Runnable
/// on the number of connections waiting to be served.
///
/// It is possible to specify a maximum number of queued connections.
/// This prevents the connection queue from overflowing in the
/// This prevents the connection queue from overflowing in the
/// case of an extreme server load. In such a case, connections that
/// cannot be queued are silently and immediately closed.
///
@ -121,7 +123,7 @@ public:
const TCPServerParams& params() const;
/// Returns a const reference to the TCPServerParam object
/// used by the server's TCPServerDispatcher.
/// used by the server's TCPServerDispatcher.
void start();
/// Starts the server. A new thread will be
@ -138,7 +140,7 @@ public:
/// Already handled connections will continue to be served.
///
/// Once the server has been stopped, it cannot be restarted.
int currentThreads() const;
/// Returns the number of currently used connection threads.
@ -147,13 +149,13 @@ public:
int totalConnections() const;
/// Returns the total number of handled connections.
int currentConnections() const;
/// Returns the number of currently handled connections.
int maxConcurrentConnections() const;
/// Returns the maximum number of concurrently handled connections.
/// Returns the maximum number of concurrently handled connections.
int queuedConnections() const;
/// Returns the number of queued connections.
@ -180,11 +182,11 @@ private:
TCPServer();
TCPServer(const TCPServer&);
TCPServer& operator = (const TCPServer&);
ServerSocket _socket;
TCPServerDispatcher* _pDispatcher;
Poco::Thread _thread;
bool _stopped;
std::atomic<bool> _stopped;
};