version 2.33.0

piMinSleep() method
This commit is contained in:
2021-11-16 14:43:57 +03:00
parent 48c885e12a
commit a2a205cfd2
12 changed files with 28 additions and 26 deletions

View File

@@ -285,10 +285,10 @@
#define FOREVER for (;;)
//! Macro used for infinite wait
#define FOREVER_WAIT FOREVER msleep(PIP_MIN_MSLEEP);
#define FOREVER_WAIT FOREVER piMinSleep;
//! Macro used for infinite wait
#define WAIT_FOREVER FOREVER msleep(PIP_MIN_MSLEEP);
#define WAIT_FOREVER FOREVER piMinSleep;
//! global variable enabling output to piCout, default is true

View File

@@ -749,7 +749,7 @@ void PIObject::Deleter::deleteObject(PIObject * o) {
//piCout << "[Deleter] delete" << (uintptr_t)o << "...";
if (o->isPIObject()) {
//piCout << "[Deleter] delete" << (uintptr_t)o << "wait atomic ...";
while (o->isInEvent()) piMSleep(PIP_MIN_MSLEEP);
while (o->isInEvent()) piMinSleep();
//piCout << "[Deleter] delete" << (uintptr_t)o << "wait atomic done";
delete o;
}

View File

@@ -46,6 +46,8 @@ inline void piMSleep(double msecs) {piUSleep(int(msecs * 1000.));} // on !Window
* \details This function exec \a piUSleep (msecs * 1000000). */
inline void piSleep(double secs) {piUSleep(int(secs * 1000000.));} // on !Windows consider constant "usleep" offset
//! Shortest available on current system sleep
inline void piMinSleep() {piMSleep(PIP_MIN_MSLEEP);}