1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

clang format apply

This commit is contained in:
Leonid Fedorov
2022-01-21 16:43:49 +00:00
parent 6b6411229f
commit 04752ec546
1376 changed files with 393460 additions and 412662 deletions

View File

@ -25,33 +25,29 @@
namespace idbdatafile
{
/* This should be renamed; it's more than a pool, it also does the low-level communication. TBD. */
class SocketPool : public boost::noncopyable
{
public:
SocketPool();
// the dtor will immediately close all sockets
virtual ~SocketPool();
// 0 = success, -1 = failure. Should this throw instead?
int send_recv(messageqcpp::ByteStream &to_send, messageqcpp::ByteStream *to_recv);
public:
SocketPool();
private:
int getSocket();
void returnSocket(const int sock);
void remoteClosed(const int sock);
std::vector<int> allSockets;
std::deque<int> freeSockets;
boost::mutex mutex;
boost::condition_variable socketAvailable;
uint maxSockets;
static const uint defaultSockets = 20;
// the dtor will immediately close all sockets
virtual ~SocketPool();
// 0 = success, -1 = failure. Should this throw instead?
int send_recv(messageqcpp::ByteStream& to_send, messageqcpp::ByteStream* to_recv);
private:
int getSocket();
void returnSocket(const int sock);
void remoteClosed(const int sock);
std::vector<int> allSockets;
std::deque<int> freeSockets;
boost::mutex mutex;
boost::condition_variable socketAvailable;
uint maxSockets;
static const uint defaultSockets = 20;
};
}
} // namespace idbdatafile