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

Deadlock if invalid format of stop words #12

Open
mbyd916 opened this issue Jan 3, 2020 · 0 comments · May be fixed by #13
Open

Deadlock if invalid format of stop words #12

mbyd916 opened this issue Jan 3, 2020 · 0 comments · May be fixed by #13

Comments

@mbyd916
Copy link

mbyd916 commented Jan 3, 2020

For stop words, valid format is : one stop word in each line.

Extra spaces followed stop word may cause error, and will be sent to errCh (unbuffered channel). Refers to dictionary.go#L38.
But dictionary.go#L68 still waits for tokenCh, therefore dictionary.go#L70 can not receive from errCh, finally DeadLock occurs.

There is the same problem, if error(dictionary.go#L49 ) occurs.

stop word followed by extra space

@mbyd916 mbyd916 linked a pull request Jan 3, 2020 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