version 2.33.0
piMinSleep() method
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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);}
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user