Releases: alitto/pond
Releases · alitto/pond
Release v2.1.3
What's Changed
Full Changelog: v2.1.2...v2.1.3
Release v2.1.2
What's Changed
Full Changelog: v2.1.1...v2.1.2
Release v2.1.1
What's Changed
- feat(taskgroup): wait for ongoing tasks complete when group is stopped or context is cancelled by @alitto in #82
Full Changelog: v2.1.0...v2.1.1
Release v2.1.0
What's Changed
- feat(taskgroup): improve task group functionality by @alitto in #81
- Added a new method to the pool to create a task group associated with a context (
pool.NewGroupContext(ctx)
) - Added new methods to task groups:
group.Done()
: returns a channel that is closed when all tasks in the group finish or the first error is returned.group.Stop()
: stops the task group. Queued tasks will be discarded but running tasks will complete their execution.
- Added a new example showcasing the new
pool.NewGroupContext(ctx)
method.
- Added a new method to the pool to create a task group associated with a context (
Full Changelog: v2.0.4...v2.1.0
Release v2.0.4
What's Changed
Full Changelog: v2.0.3...v2.0.4
Release v2.0.3
What's Changed
Full Changelog: v2.0.2...v2.0.3
Release v2.0.2
Changes
- Expose
Stopped() bool
method in pools to indicate whether the pool has been stopped or its associated context has been cancelled.
Fixes
- Ensure
ErrPoolStopped
error is always returned when attempting to submit a task to a pool that has been stopped or its associated context cancelled.
Release v2.0.1
Fixes
- Avoid launching workers that exit immediately without running any tasks.
- Prevent task group
Wait()
from returning eagerly when tasks are executed before submitting the last one of the group.
Release v2.0.0
What's new in v2?
Version 2 of pond
introduces many improvements and new features:
- Unbounded Task Queues: Task queues are now unbounded by default, simplifying pool creation.
- Task Submission with Results: New APIs allow tasks to return results, enhancing flexibility.
- Awaitable Task Completion: Tasks can now be awaited, providing better control over task execution.
- Type Safe APIs: Improved type safety for tasks that return errors or results.
- Panics Recovery: Panics during task execution are captured and returned as errors, allowing graceful error handling.
- Subpools: Create subpools with a fraction of the parent pool's workers for specific tasks.
- Default Pool: A global default pool is available for task submission without explicit pool creation.
Migration from v1 to v2
There have been a significant number of breaking changes in v2, so please make sure to read the migration guide if you are upgrading from v1.
Release v1.9.2
Changes included
- Fix bug that worker doesn't return after context cancel #71 - Thanks @hongkuancn!
- Drain tasks in an unblocked way to avoid data race #72 (fixes #70) - Again, thanks @hongkuancn! 🙌