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

Question: Are participle.Parser instances thread-safe? #375

Closed
bradosg opened this issue Oct 19, 2023 · 1 comment
Closed

Question: Are participle.Parser instances thread-safe? #375

bradosg opened this issue Oct 19, 2023 · 1 comment

Comments

@bradosg
Copy link

bradosg commented Oct 19, 2023

Once a participle.Parser has been created, is it safe to call Parse(), ParseBytes(), etc. from multiple go routines at the same time? (Or do I need to make a pool of participle.Parser instances.)

I didn't see anything in the documentation about this, and there's enough interesting stuff going on internally that is wasn't clear to me by skimming the source either.

Any info on this would be helpful. Thanks in advance.

@alecthomas
Copy link
Owner

Yes, parser instances are thread safe.

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