vickumar1981 / stringdistance

A fuzzy matching string distance library for Scala and Java that includes Levenshtein distance, Jaro distance, Jaro-Winkler distance, Dice coefficient, N-Gram similarity, Cosine similarity, Jaccard similarity, Longest common subsequence, Hamming distance, and more..
https://vickumar1981.github.io/stringdistance/api/com/github/vickumar1981/stringdistance/index.html
Other
75 stars 15 forks source link

is thread-safe or not? #72

Open shlomishasho27 opened 8 months ago

shlomishasho27 commented 8 months ago

Hey, I just want to confirm - is the library thread-safe or not?

Thanks

shlomishasho27 commented 8 months ago

@vickumar1981

vickumar1981 commented 8 months ago

@shlomishasho27 though i haven't really tested, i believe it should be thread-safe, b/c the functions don't rely on mutation of the inputs. i.e., it should be ok to call the distance and scoring methods from different threads - i don't see a use case where this would cause a problem.

thanks.

vickumar1981 commented 8 months ago

@shlomishasho27 were you able to run the distance and score functions in separate threads?