Skip to content

Support the free-threaded build with python backend #975

@skirpichev

Description

@skirpichev

Currently, it fails: #974 (comment)

I suspect, that this mostly coming from using global caches, e.g.:

cos_sin_cache = {}
# Number of integer logarithms to cache (for zeta sums)
MAX_LOG_INT_CACHE = 2000
log_int_cache = {}

See https://py-free-threading.github.io/porting/#dealing-with-mutable-global-state

We also use lru_cache(), which is not thread-safe, until recently.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementnew feature requests (or implementation)

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions