piethernet threaded connect fix, small brush of PIIODevice

This commit is contained in:
2022-10-23 21:38:10 +03:00
parent 2cf561767f
commit 3a5050b028
3 changed files with 25 additions and 15 deletions

View File

@@ -528,13 +528,15 @@ protected:
virtual void threadedReadBufferSizeChanged() {;}
static PIIODevice * newDeviceByPrefix(const char * prefix);
bool blockingReadFlag() const;
void setBlockingReadFlag(bool yes);
DeviceMode mode_;
DeviceOptions options_;
ReadRetFunc func_read;
bool opened_;
void * ret_data_;
ReadRetFunc func_read = nullptr;
bool opened_ = false;
void * ret_data_ = nullptr;
private:
EVENT_HANDLER(void, read_func);
@@ -550,11 +552,10 @@ private:
PIThread read_thread, write_thread;
PIByteArray buffer_in, buffer_tr;
PIQueue<PIPair<PIByteArray, ullong> > write_queue;
ullong tri;
ssize_t readed_;
ullong tri = 0;
uint threaded_read_buffer_size, reopen_timeout = 1000;
std::atomic_bool reading_now;
bool thread_started_, raise_threaded_read_, reopen_enabled = true;
bool reopen_enabled = true;
static PIMutex nfp_mutex;
static PIMap<PIString, PIString> nfp_cache;