[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [paho-dev] Python MQTT client publish.single/multiple blocks indefinitely?
|
Hi Tony,
publish.single() and multiple() do use loop_forever() which will block
"forever", but they use callbacks to break out of this. The
_on_publish() callback calls disconnect() when all of the messages
have been sent, and this (should) cause it to drop out of the
loop_forever() call.
If that isn't working for you, can you describe something about your
setup? (OS, Python version, ...)
Cheers,
Roger
On Fri, May 16, 2014 at 10:56 PM, Tony DiCola <tony@xxxxxxxxxxxxxx> wrote:
> Hey all, sorry if this is a known issue but is it by design that the
> publish.single or multiple functions are supposed to block indefinitely? I
> noticed the source for them connects, sends messages, and then calls
> client.loop_forever() so execution never returns back to the caller. How is
> a client application supposed to use these functions?
>
> _______________________________________________
> paho-dev mailing list
> paho-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/paho-dev
>