Skip to content

introduce GoForEach functions #150

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

iwata
Copy link

@iwata iwata commented Feb 13, 2025

Add GoForEach that handles the iterator introduced in Go 1.23 as an argument for each Pool, Stream, and WaitGroup.

…or_pool.go, result_pool.go): add GoForEach method to execute functions concurrently for each element in the iterator while maintaining order

💡 (context_pool.go, error_pool.go, result_context_pool.go, result_error_pool.go, result_pool.go): add comments to describe the purpose and functionality of the GoForEach method
…text_pool_test.go, result_pool_test.go, stream_test.go, waitgroup_test.go): add Example functions for GoForEach to demonstrate usage and expected output

📝 (context_pool_test.go, error_pool_test.go, pool_test.go, result_context_pool_test.go, result_pool_test.go, stream_test.go, waitgroup_test.go): update tests to include iter package for better sequence handling in examples
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 this pull request may close these issues.

1 participant