PICloudServer don't delete clients
This commit is contained in:
@@ -83,6 +83,7 @@ private:
|
||||
int sendData(const PIByteArray & data, uint client_id);
|
||||
|
||||
PIVector<Client *> clients_;
|
||||
PIVector<Client *> removed_clients_;
|
||||
PIMap<uint, Client *> index_clients;
|
||||
PITimer ping_timer;
|
||||
mutable PIMutex clients_mutex;
|
||||
|
||||
@@ -315,10 +315,10 @@ public:
|
||||
|
||||
//! \~english Remove element with key `key` from the array and return it.
|
||||
//! \~russian Удаляет элемент с ключом `key` из массива и возвращает его.
|
||||
inline T take(const Key & key) const {
|
||||
inline T take(const Key & key, const T & default_ = T()) {
|
||||
bool f(false);
|
||||
ssize_t i = _find(key, f);
|
||||
if (!f) return T();
|
||||
if (!f) return default_;
|
||||
T ret(pim_content[pim_index[i].index]);
|
||||
_remove(i);
|
||||
return ret;
|
||||
|
||||
@@ -122,7 +122,7 @@ void PIThreadNotifier::wait() {
|
||||
//! \~russian
|
||||
//! Если ожидают несколько потоков, то уведомляет один случайный.\n
|
||||
//! Если вызвать "n" раз, то все ожидающие потоки уведомятся суммарно "n" раз.
|
||||
void PIThreadNotifier::notifyOnce() {
|
||||
void PIThreadNotifier::notify() {
|
||||
m.lock();
|
||||
cnt++;
|
||||
v.notifyAll();
|
||||
|
||||
@@ -39,7 +39,7 @@ public:
|
||||
|
||||
//! \~english Notify one waiting thread, which waiting on \a wait() function
|
||||
//! \~russian Уведомить один из ожидающих потоков, которые висят на методе \a wait()
|
||||
void notifyOnce();
|
||||
void notify();
|
||||
|
||||
private:
|
||||
ullong cnt;
|
||||
|
||||
Reference in New Issue
Block a user