Skip to content

Please add a warning that Re.Str is not thread safe #194

Open
@edwintorok

Description

@edwintorok

Like Str itself, Re.Str is not thread safe as it relies on global internal state.
Initially I thought that Re.Str might be thread safe (e.g. if you only use functions like global_replace), but looking at the implementation it is not.

It might be useful to have a variant of Re that provides an Str compatible syntax, but a thread-safe interface (the current Str interface is not thread safe because querying match groups doesn't take the match result as a parameter), but meanwhile a warning in the documentation would be nice.

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