migrate to async IO model
new PIIODevice::interrupt() virtual method new PIWaitEvent private class PIEthernet and PISerial basically tested on Windows and Linux
This commit is contained in:
@@ -277,6 +277,14 @@ public:
|
||||
//! \~russian Останавливает потоковое чтение и запись.
|
||||
void stop();
|
||||
|
||||
//! \~english Stop both threaded read and threaded write and wait for finish.
|
||||
//! \~russian Останавливает потоковое чтение и запись и ожидает завершения.
|
||||
void stopAndWait(int timeout_ms = -1);
|
||||
|
||||
//! \~english Interrupt blocking operation.
|
||||
//! \~russian Прерывает блокирующую операцию.
|
||||
virtual void interrupt() {}
|
||||
|
||||
|
||||
//! \~english Read from device maximum "max_size" bytes to "read_to"
|
||||
//! \~russian Читает из устройства не более "max_size" байт в "read_to"
|
||||
@@ -561,7 +569,7 @@ private:
|
||||
PIQueue<PIPair<PIByteArray, ullong> > write_queue;
|
||||
ullong tri = 0;
|
||||
uint threaded_read_buffer_size, reopen_timeout = 1000;
|
||||
bool reopen_enabled = true;
|
||||
bool reopen_enabled = true, destroying = false;
|
||||
|
||||
static PIMutex nfp_mutex;
|
||||
static PIMap<PIString, PIString> nfp_cache;
|
||||
|
||||
Reference in New Issue
Block a user