migrate to PIThreadPoolWorker
This commit is contained in:
@@ -70,7 +70,6 @@ private:
|
||||
Idle,
|
||||
Connecting,
|
||||
Connected,
|
||||
Disconnecting,
|
||||
};
|
||||
|
||||
struct ConnectInfo {
|
||||
@@ -88,7 +87,8 @@ private:
|
||||
void mqtt_deliveryComplete(int token);
|
||||
void mqtt_messageArrived(const Message & msg);
|
||||
|
||||
void connectInternal();
|
||||
void connectInternal(const ConnectInfo & ci);
|
||||
void disconnectInternal();
|
||||
void publishInternal(const Message & m);
|
||||
void subscribeInternal(const Subscribe & sub);
|
||||
void unsubscribeInternal(const PIString & topic);
|
||||
@@ -97,15 +97,10 @@ private:
|
||||
|
||||
void run();
|
||||
|
||||
PIProtectedVariable<PIQueue<Message>> pub_queue;
|
||||
PIProtectedVariable<PIQueue<Subscribe>> sub_queue;
|
||||
PIProtectedVariable<PIQueue<PIString>> unsub_queue;
|
||||
PIProtectedVariable<ConnectInfo> connect_info;
|
||||
PIThreadNotifier notifier;
|
||||
std::atomic_int m_status = {Idle};
|
||||
PISystemTime connect_timeout = 10_s;
|
||||
PIThread * thread = nullptr;
|
||||
// PIThreadPoolWorker * worker = nullptr;
|
||||
std::atomic_int m_status = {Idle};
|
||||
std::atomic_bool is_destoying = {false};
|
||||
PISystemTime connect_timeout = 10_s;
|
||||
PIThreadPoolWorker * worker = nullptr;
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user