Enhancement #1463

Improve termination of python processes

Added by J. Wienke about 11 years ago. Updated over 6 years ago.

Status:NewStart date:04/15/2013
Priority:LowDue date:
Assignee:-% Done:

0%

Category:Python
Target version:rsb-0.18

Description

Currently, if rsb objects are not properly deactivated, the python process does not terminate correctly, even if exit is called. This is caused by hanging background threads from the connectors. While it is usually a good habit to properly deactivate rsb objects, this is not always easily in python, as no automatic destruction mechanism exists. Especially in the case of an exception it is hard to correctly tear down remaining rsb objects bevor passing the exception to the python runtime again for program termination. We should somehow find a way of improving this situation so that processes don't always hang around dangling without clear indication why.


Related issues

Related to Robotics Service Bus - Feature #1140: Implement context manager protocol for participants Resolved 08/16/2012

History

#1 Updated by J. Moringen about 11 years ago

The situation could be slightly improved by implementing #1140.

#2 Updated by J. Wienke about 11 years ago

Yes, that's true, but this pattern cannot be applied generally. It's hard to use this throughout more complex hierarchies and behind conventional interfaces.

One thing I could think of is registering all rsb objects in a central list that can be iterated in error handling code for destruction. IS it possible to have a try-finally statement inside a module? Then, inside the finally, that list could be cleared.

#3 Updated by J. Moringen over 10 years ago

Maybe there is an interpreter-exit-hook?

#5 Updated by J. Moringen over 10 years ago

  • Target version changed from rsb-0.10 to rsb-0.11

#6 Updated by J. Wienke over 9 years ago

  • Priority changed from Normal to Low
  • Target version changed from rsb-0.11 to rsb-0.12

#7 Updated by J. Wienke about 9 years ago

  • Target version changed from rsb-0.12 to rsb-0.13

#8 Updated by J. Moringen about 8 years ago

  • Target version changed from rsb-0.13 to rsb-0.14

#9 Updated by J. Moringen almost 8 years ago

  • Target version changed from rsb-0.14 to rsb-0.15

#10 Updated by J. Moringen over 7 years ago

  • Target version changed from rsb-0.15 to rsb-0.16

#11 Updated by J. Moringen about 7 years ago

  • Target version changed from rsb-0.16 to rsb-0.17

#12 Updated by J. Moringen over 6 years ago

  • Target version changed from rsb-0.17 to rsb-0.18

Also available in: Atom PDF