You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
yes, some way to access the equivalent of the re field from the regexp type.
(I was going to say the mtch or srch fields, but those use Lazy, which is again not thread safe).
Although looking at the implementation, it just calls Emacs.re, but should that change in the future (e.g. the Emacs regex gains some additional syntax that is incompatible with Str), an Str.re would be useful.
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.
The text was updated successfully, but these errors were encountered: