We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Now the coprocessor works with 3 types of goroutines.
copIteratorWorker
copIteratorTaskSender
Next
┌────────┐ │ │ ┌───►│ worker ├───┐ │ │ │ │ │ └────────┘ │ │ │ │ ┌────────┐ │ │ │ │ │ ├───►│ worker ├───┤ │ │ │ │ │ └────────┘ │ │ │ ┌────────┐ │ ┌────────┐ │ ┌────────┐ │ │ │ │ │ │ │ │ │ sender ├───┼───►│ worker ├───┼───►│ Next │ │ │ │ │ │ │ │ │ └────────┘ │ └────────┘ │ └────────┘ │ │ │ ┌────────┐ │ │ │ │ │ ├───►│ worker ├───┤ │ │ │ │ │ └────────┘ │ │ │ │ ┌────────┐ │ │ │ │ │ └───►│ worker ├───┘ │ │ └────────┘
When the number of tasks is low, the sender is not required, and it can just be:
┌────────┐ │ │ │ worker ├───┐ │ │ │ └────────┘ │ │ ┌────────┐ │ │ │ │ │ worker ├───┤ │ │ │ └────────┘ │ │ ┌────────┐ │ ┌────────┐ │ │ │ │ │ │ worker ├───┼───►│ Next │ │ │ │ │ │ └────────┘ │ └────────┘ │ ┌────────┐ │ │ │ │ │ worker ├───┤ │ │ │ └────────┘ │ │ ┌────────┐ │ │ │ │ │ worker ├───┘ │ │ └────────┘
This can erase the sender goroutine and the channel between sender and workers.
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Enhancement
Now the coprocessor works with 3 types of goroutines.
copIteratorWorker
handle the task, send it to stores.copIteratorTaskSender
dispatch the task and control the concurrency.Next
wait for data respoinse from worker.When the number of tasks is low, the sender is not required, and it can just be:
This can erase the sender goroutine and the channel between sender and workers.
The text was updated successfully, but these errors were encountered: