Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regex objects should be reuse-safe and thread-safe #2

Open
KarolS opened this issue Jun 9, 2014 · 1 comment
Open

Regex objects should be reuse-safe and thread-safe #2

KarolS opened this issue Jun 9, 2014 · 1 comment

Comments

@KarolS
Copy link

KarolS commented Jun 9, 2014

Currently:

  • Regex objects store in them the results of the last match; these should be moved somewhere else so the objects can be reused safely.
  • Fuzzy class stores temporary values in static fields, making it totally thread-unsafe.

There are probably more problems similar to those, those two I found after just a cursory glance into the source code.

Currently, in order to use this library, I had to wrap all operations on Regex objects in a static synchronize block and pull out all the results from them while still inside the lock.

@RodionGork
Copy link
Owner

Yes, I'm afraid that when I wrote this, I have little understanding of thread-safety :)
I hope we can find a volunteer to fix this...

UPD I've removed staticness from Fuzzy. Updated binaries at frej.sf.net

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants