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

Is parseText thread safe? #20

Open
fabrichter opened this issue Oct 25, 2018 · 1 comment
Open

Is parseText thread safe? #20

fabrichter opened this issue Oct 25, 2018 · 1 comment
Labels

Comments

@fabrichter
Copy link

Thanks for your great work on this project!
I was wondering if the implementation is thread safe when used in a read-only fashion,
i.e. I want to initalize one AhoCorasickDoubleArrayTrie, set it up via build once
and then call parseText from multiple threads. Is this possible / safe to do?

@hankcs
Copy link
Owner

hankcs commented Oct 26, 2018

Yes, it's safe to call parseText from multiple threads. As this method doesn't modify any members, but put every temporary result on stack, it's thread safe.

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

No branches or pull requests

2 participants