-
Notifications
You must be signed in to change notification settings - Fork 102
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
[UDD-35] Concurrent Document Extraction Eexample #255
[UDD-35] Concurrent Document Extraction Eexample #255
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add README.md
file for this new folder. You could see other folders for example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
added a comment
|
||
// runConcurrent takes the list of input documents and destination output directory and runs the extraction concurrently. | ||
func runConcurrent(documents []string, outputDir string) { | ||
res := make(chan map[string]string, 3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this same as document length? like
res := make(chan map[string]string, len(documents))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not necessarily. If we are reading as soon as the go routines are writting to the channel a buffer length of 1 is still enough but I made it 3 just to be safe. I think may be i should increase that in case reading side is very slow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sampila Updated. Can you check again?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
No description provided.