qpid-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andi welchlin <andi.welch...@gmail.com>
Subject Re: QPID Proton 0.19 Python: Exit MessagingHandler.run()
Date Thu, 22 Feb 2018 10:33:48 GMT
Hello Gordon,

I tried somthing similar, but it hangs, anyway.

When I run your program with the changes it hangs. The output ist:

andreas:/home/andreas/src/python/test_dmitry_restart_receiver
>./test_shutdown.py
run container
press enteron start

call stop
call join
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
on_stop
Exception ignored in: <object repr() failed>
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/proton/wrapper.py", line 95, in
__del__
    pn_decref(self._impl)
  File "/usr/lib/python3/dist-packages/proton/wrapper.py", line 63, in
__getattr__
    attrs = self.__dict__["_attrs"]
KeyError: ('_attrs',)


Do you know how to solve this?

Thanks,
Andreas

On Thu, Feb 22, 2018 at 11:16 AM, Gordon Sim <gsim@redhat.com> wrote:

> The container is single-threaded, so invoking methods on it from another
> thread is not safe (it would be nice if close() were an exception here, but
> I guess it is not).
>
> What you can do is inject an application defined event into the loop to do
> the shutdown. E.g. as in attached modification to your example.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message