Skip to content

Circular dependencies make GC unpredicable #214

@freider

Description

@freider

Synchronicity currently creates circular references:

async_method [-> Interfaces attribute] -> wrapper_method -> synchronizer instance -> thread + event loop -> [possibly references to the original async_method]
         ^                                     v
          ---------------------<---------------

This leads to unpredictable gc behavior of the synchronizer instance (normally at interpreter shutdown) since the gc normally wants to collect any parent before it collects its attributes/references.

This is what causes the Synchronizer.__del__ to never run at the moment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions