Skip to content

Releases: alitto/pond

Release v2.1.3

13 Nov 15:02
9f8d16a
Compare
Choose a tag to compare

What's Changed

  • fix(taskgroup): failed group tasks not counted by @alitto in #85

Full Changelog: v2.1.2...v2.1.3

Release v2.1.2

13 Nov 14:29
543ed3a
Compare
Choose a tag to compare

What's Changed

  • fix(pool): fix race condition with small pool sizes by @alitto in #83

Full Changelog: v2.1.1...v2.1.2

Release v2.1.1

10 Nov 21:50
f1d2a44
Compare
Choose a tag to compare

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

09 Nov 14:32
11ecf70
Compare
Choose a tag to compare

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.

Full Changelog: v2.0.4...v2.1.0

Release v2.0.4

29 Oct 11:40
12d1782
Compare
Choose a tag to compare

What's Changed

  • fix(group): do not panic when submitting zero tasks by @alitto in #79

Full Changelog: v2.0.3...v2.0.4

Release v2.0.3

24 Oct 14:21
1e28250
Compare
Choose a tag to compare

What's Changed

  • fix(taskgroups): do not start remaining tasks after context cancellation by @alitto in #77

Full Changelog: v2.0.2...v2.0.3

Release v2.0.2

21 Oct 22:11
Compare
Choose a tag to compare

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

20 Oct 17:59
d0bc8c6
Compare
Choose a tag to compare

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

20 Oct 00:54
b327a6c
Compare
Choose a tag to compare

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

01 Sep 14:43
18002c1
Compare
Choose a tag to compare

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! 🙌