Skip to content

Hangs on re-entrant cache decorators? #36

@jaens

Description

@jaens

My code has a @cachebox.cached decorator attached to a function, which then calls another (nested) @cachebox.cached in its scope. (both decorators are using the same cachebox.Cache(maxsize=0))

Both functions are called simultaneously (mixed) from multiple threads.

When there are a lot of those function calls, the entire application hangs. This is fixed by removing the @cachebox.cached decorator from one of the functions.

So I'm guessing there's some sort of race condition or deadlock somewhere...

(the application itself has no locks at all, it's purely data-parallel via ThreadPoolExecutor)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions