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 <[email protected]> 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: [email protected]
> For additional commands, e-mail: [email protected]
>