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

Concurrent map access during NaiveBayes's OnlineLearning sequence #8

Closed
piazzamp opened this issue Jul 22, 2016 · 0 comments
Closed

Comments

@piazzamp
Copy link
Collaborator

In theOnlineLearn method, Words are written to the model's counts of words while the Predict, Probability, and TFIDF.InverseDocumentFrequency methods read from that same map. The only indication that training is done is that the errors channel passed in to OnlineLearn is closed, at which point it's safe to use the model. Otherwise, a runtime error will occur as a result of the concurrent map reads and writes.

cdipaolo added a commit that referenced this issue Jul 23, 2016
add concurrency-friendly map access to fix #8
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

1 participant