PIThread::stopAndWait
This commit is contained in:
@@ -594,6 +594,12 @@ PIThread::~PIThread() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void PIThread::stopAndWait(int timeout_ms) {
|
||||||
|
stop();
|
||||||
|
waitForFinish(timeout_ms);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#ifdef WINDOWS
|
#ifdef WINDOWS
|
||||||
NTAPI void winThreadAPC(ULONG_PTR) {
|
NTAPI void winThreadAPC(ULONG_PTR) {
|
||||||
//piCout << "APC";
|
//piCout << "APC";
|
||||||
|
|||||||
@@ -111,6 +111,10 @@ public:
|
|||||||
EVENT_HANDLER1(void, stop, bool, wait);
|
EVENT_HANDLER1(void, stop, bool, wait);
|
||||||
EVENT_HANDLER0(void, terminate);
|
EVENT_HANDLER0(void, terminate);
|
||||||
|
|
||||||
|
//! \~english Stop thread and wait for finish.
|
||||||
|
//! \~russian Останавливает потоков и ожидает завершения.
|
||||||
|
void stopAndWait(int timeout_ms = -1);
|
||||||
|
|
||||||
void interrupt();
|
void interrupt();
|
||||||
|
|
||||||
//! \~english Set common data passed to external function
|
//! \~english Set common data passed to external function
|
||||||
|
|||||||
Reference in New Issue
Block a user