PIObject::deleted now has 1 argument

PIIODevice small refactoring
new PIIODevice virtual methods: threadedReadTerminated() and threadedWriteTerminated()
PIIODevice::stop now accept bool "hard" instead of "wait"

PIStreamPacker new features: packet size crypt and aggressive optimization
This commit is contained in:
2021-04-07 22:13:56 +03:00
parent b2f8132518
commit 4584d9c639
13 changed files with 219 additions and 50 deletions

View File

@@ -151,6 +151,8 @@ bool PIBinaryLog::openDevice() {
bool PIBinaryLog::closeDevice() {
stopThreadedRead();
pausemutex.unlock();
moveIndex(-1);
is_indexed = false;
index.clear();
@@ -177,8 +179,8 @@ bool PIBinaryLog::threadedRead(uchar *readed, int size) {
case PlayRealTime:
pausemutex.lock();
if (is_pause) {
piMSleep(100);
pausemutex.unlock();
piMSleep(100);
return false;
} else if (pause_time > PISystemTime()) {
startlogtime += pause_time;