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

Linguist isn't thread safe #12

Open
ianlewis opened this issue Sep 2, 2023 · 1 comment · May be fixed by #16
Open

Linguist isn't thread safe #12

ianlewis opened this issue Sep 2, 2023 · 1 comment · May be fixed by #16

Comments

@ianlewis
Copy link

ianlewis commented Sep 2, 2023

Currently you can't call LanguageByContents (and I believe other functions as well) from multiple goroutines.

Will add the exact error encountered later.

@ianlewis
Copy link
Author

ianlewis commented Nov 5, 2023

Probably it's not necessary to be able to be used by multiple goroutines. It could just be documented in the godoc.

ianlewis added a commit to ianlewis/linguist that referenced this issue Nov 5, 2023
Updates the package doc comment to add a note about parallel execution
since methods are not safe to be called from multiple goroutines.

Package doc comment was also formatted using Godoc best practices.
https://tip.golang.org/doc/comment

Fixes dayvonjersen#12

Signed-off-by: Ian Lewis <[email protected]>
@ianlewis ianlewis linked a pull request Nov 5, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant