mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-07-01 02:53:56 -07:00
made server threaded, fixing issue #51
This commit is contained in:
parent
b328c1ed4d
commit
520300dc86
14 changed files with 108 additions and 37 deletions
|
|
@ -11,13 +11,13 @@ class Servatrice_ConnectionPool : public QObject {
|
|||
Q_OBJECT
|
||||
private:
|
||||
Servatrice_DatabaseInterface *databaseInterface;
|
||||
bool threaded;
|
||||
mutable QMutex clientCountMutex;
|
||||
int clientCount;
|
||||
public:
|
||||
Servatrice_ConnectionPool(Servatrice_DatabaseInterface *_databaseInterface)
|
||||
: databaseInterface(_databaseInterface), clientCount(0)
|
||||
{
|
||||
}
|
||||
Servatrice_ConnectionPool(Servatrice_DatabaseInterface *_databaseInterface);
|
||||
~Servatrice_ConnectionPool();
|
||||
|
||||
Servatrice_DatabaseInterface *getDatabaseInterface() const { return databaseInterface; }
|
||||
|
||||
int getClientCount() const { QMutexLocker locker(&clientCountMutex); return clientCount; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue