Skip to content

Commit

Permalink
Fixed insignificant error in Poco, shown by TSan [#CLICKHOUSE-2].
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-milovidov committed Sep 9, 2017
1 parent 253893b commit 2e74123
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions contrib/libpoco/Net/include/Poco/Net/TCPServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#include "Poco/Thread.h"
#include "Poco/ThreadPool.h"

#include <atomic>


namespace Poco {
namespace Net {
Expand Down Expand Up @@ -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.
///
Expand Down Expand Up @@ -121,7 +123,7 @@ class Net_API TCPServer: public Poco::Runnable

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
Expand All @@ -138,7 +140,7 @@ class Net_API TCPServer: public Poco::Runnable
/// 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.

Expand All @@ -147,13 +149,13 @@ class Net_API TCPServer: public Poco::Runnable

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.

Expand All @@ -180,11 +182,11 @@ class Net_API TCPServer: public Poco::Runnable
TCPServer();
TCPServer(const TCPServer&);
TCPServer& operator = (const TCPServer&);

ServerSocket _socket;
TCPServerDispatcher* _pDispatcher;
Poco::Thread _thread;
bool _stopped;
std::atomic<bool> _stopped;
};


Expand Down

0 comments on commit 2e74123

Please sign in to comment.