[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [paho-dev] Python paho.mqtt with asyncio
|
Hi,
On Wed, May 24, 2017 at 10:23:20AM +0200, Pierre Fersing wrote:
> There are already two issues #147 and #72 about asynchronous loop but
> currently both proposed example had drawback.
OK, interesting... will look at these issues too.
> Since I don't have experience with asyncio, I don't know if the library
> could help using it with asyncio by exposing additional
> attribute/method/callback. If you have some suggestions, I'll take them :)
Well, the only thing I could think of now is a callback that is executed
(just before exiting the mqtt module code) every time the want_write()
state has *changed* (either becoming True or False, only a callback for
True would not help much). This is similar to what I'm doing now manually.
In my case I keep the previous want_write() state in my client wrapper
class (to avoid redundant asyncio add/remove_writer() calls).
Regards,
--
-- Jos Vos <jos@xxxxxx>
-- X/OS Experts in Open Systems BV | Office: +31 20 6938364
-- Amsterdam, The Netherlands | Mobile: +31 6 26216181