What prevents sendRecv from becoming an infinity loop if self.__event_queue is empty and it gets an event with the a content type other than "api/response" or "command/reply"?
If I'm reading your code correctly (and I'm not sure that I am) then sendRecv would store this event in self.__event_queue and then call self.recvEvent() which grabs the just stored event from the queue and returns it again.
Is there something I'm missing?
What prevents
sendRecvfrom becoming an infinity loop ifself.__event_queueis empty and it gets an event with the a content type other than "api/response" or "command/reply"?If I'm reading your code correctly (and I'm not sure that I am) then
sendRecvwould store this event inself.__event_queueand then callself.recvEvent()which grabs the just stored event from the queue and returns it again.Is there something I'm missing?