important:

* PIThread::~PIThread() now unregister itself from introspection, if terminates than show warning
 * PISystemMonitor now correctly stops
 * PIPeer now can correctly stopAndWait
 * PIPeer::destroy(), protected method for close all eths and threads
 * new PIINTROSPECTION_STOP macro
 * Introspection now can be correctly stopped by macro, more safety

ClientServer:
 * ClientBase::close() stop and disconnect channel
 * Server clients clean-up now event-based
 * No warnings on client destructor
This commit is contained in:
2024-09-12 17:07:48 +03:00
parent da4b09be9e
commit 996b7ea403
17 changed files with 189 additions and 99 deletions

View File

@@ -72,9 +72,9 @@
//! w->startOnce();
//!
//! piMSleep(500);
//! notifier.notifyOnce(); // notify one of them after 500 ms
//! notifier.notify(); // notify one of them after 500 ms
//! piMSleep(500);
//! notifier.notifyOnce(); // notify one of them after 1000 ms
//! notifier.notify(); // notify one of them after 1000 ms
//!
//! for (auto * w: workers)
//! w->waitForFinish();
@@ -93,17 +93,17 @@ PIThreadNotifier::PIThreadNotifier(): cnt(0) {}
//! \~\details
//! \~english
//! If \a notifyOnce() has been called before, then returns immediately.\n
//! If \a notifyOnce() has been called "n" times, then returns immediately "n" times,
//! If \a notify() has been called before, then returns immediately.\n
//! If \a notify() has been called "n" times, then returns immediately "n" times,
//! but only if wait in one thread.\n
//! If many threads waiting, then if \a notifyOnce() has been called "n" times,
//! If many threads waiting, then if \a notify() has been called "n" times,
//! all threads total returns "n" times in undefined sequence.
//!
//! \~russian
//! Если ранее был вызван \a notifyOnce(), то возвращает управление немедленно.\n
//! Если ранее был вызван \a notifyOnce() "n" раз, то возвращает управление немедленно "n" раз,
//! Если ранее был вызван \a notify(), то возвращает управление немедленно.\n
//! Если ранее был вызван \a notify() "n" раз, то возвращает управление немедленно "n" раз,
//! но только если ожидать одним потоком.\n
//! Если ожидают несколько потоков, и \a notifyOnce() был вызван "n" раз,
//! Если ожидают несколько потоков, и \a notify() был вызван "n" раз,
//! то все потоки суммарно вернут управление "n" раз в неопределенной последовательности.
//!
void PIThreadNotifier::wait() {