Skip to content
Snippets Groups Projects
  • Marco Biasini's avatar
    e35160d0
    make sure singletons don't reference any Python objects · e35160d0
    Marco Biasini authored
    The order of destruction of static objects, e.g. singletons is
    arbitrary and can not be relied upon. For some versions of
    Python, the singletons are destroyed after Python has shutdown.
    When objects stored in the singletons have been created in Python,
    a segfault is produced when they are destroyed, since the destructor
    assumes a Python interpreter exists. To work around that, we register
    atexit handlers to remove all references to Python objects. That's
    required for the IOProfileRegistry and Conopology singletons.
    e35160d0
    History
    make sure singletons don't reference any Python objects
    Marco Biasini authored
    The order of destruction of static objects, e.g. singletons is
    arbitrary and can not be relied upon. For some versions of
    Python, the singletons are destroyed after Python has shutdown.
    When objects stored in the singletons have been created in Python,
    a segfault is produced when they are destroyed, since the destructor
    assumes a Python interpreter exists. To work around that, we register
    atexit handlers to remove all references to Python objects. That's
    required for the IOProfileRegistry and Conopology singletons.