Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] paho-dev Digest, Vol 47, Issue 13

Hi Roger,

I have looked into loop_start
It just calls loop_forever in a new thread without error handling....
So if this error occurs, the background thread looks like it will just fail silently.



------------------------------

Message: 2
Date: Tue, 10 Nov 2015 09:32:03 +0000
From: Roger Light <roger@xxxxxxxxxx>
To: General development discussions for paho project
        <paho-dev@xxxxxxxxxxx>
Subject: Re: [paho-dev] Exception: 'NoneType' object has no attribute
        'recv'
Message-ID:
        <CAH7zdydtZ07dXj=kg-40BPirzRc8w8B3m8NxZrWwXKB87ktYKQ@xxxxxxxxxxxxxx>
Content-Type: text/plain; charset="utf-8"

Hi Adam,

Apologies, I was thinking of a different library. That function ought to
exist though...

I'd suggest using loop_start() - it sounds like it does much the same as
what you are doing anyway, and it means threads should work properly. You
also get automatic reconnecting.

Cheers,

Roger



On Tue, Nov 10, 2015 at 7:12 AM, Adam Mills <adam@xxxxxxxxxxxxx> wrote:

> Hi Roger,
>
> I can't find anything about threaded_set() in the python lib?
> Why I'm calling loop_forever in a thread is a long story :)
>
> Essential I am hosting a number of "plugins" in a single process. So for
> the MQTT listener plugin it is structured as if it was on the main thread
> (but its not) as most of the plugins block while they are running.
> I actually could use loop_start if thats the issue.
>
> Adam
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://dev.eclipse.org/mailman/private/paho-dev/attachments/20151110/5a7544ec/attachment.html>

------------------------------

Back to the top