Skip to content

Releases: kelindar/async

Task Chaining

05 Jul 15:36
c56f5f2

Choose a tag to compare

This release introduces a task chaining to the library, enabling sequential execution of dependent operations where the output of one task becomes the input of the next. This pattern is essential for creating processing pipelines, implementing workflows, or building reactive systems where operations must happen in a specific order. The After function provides a clean, functional approach to task composition with automatic execution and result propagation.

// Create a processing pipeline
task1 := async.NewTask(func(ctx context.Context) (string, error) {
    // Fetch raw data
    return "raw data", nil
})

task2 := async.After(task1, func(ctx context.Context, data string) (string, error) {
    // Process the raw data
    return "processed: " + data, nil
})

task3 := async.After(task2, func(ctx context.Context, processed string) (string, error) {
    // Final transformation
    return "final: " + processed, nil
})

// Start the chain by running the first task
task1.Run(context.Background())

// Get the final result
result, err := task3.Outcome()
// result will be "final: processed: raw data"

v1.3.1

19 Jun 21:21
eef95dc

Choose a tag to compare

What's Changed

Full Changelog: v1.3.0...v1.3.1

v1.3.0

19 Jun 20:10
78d80cb

Choose a tag to compare

This release modernizes and streamlines the async library by introducing type safety with Go generics, eliminating legacy features (such as Batch and Partition), and enhancing documentation and CI/CD configurations. Key changes include the refactoring of core functions like Repeat, InvokeAll, and Consume to use generics, the removal of deprecated partition/fork-join and batch code, and significant improvements to testing, documentation, and dependency management.

What's Changed

  • Simplify, make this thing type safe and optimize by @kelindar in #3

Full Changelog: v1.2.0...v1.3.0

v1.2.0

21 Nov 10:05
b427dd1

Choose a tag to compare

What's Changed

Full Changelog: v1.1.0...v1.2.0

v1.1.0

16 May 18:17
d894388

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.0.0...v1.1.0

v1.0.0

31 Mar 07:34

Choose a tag to compare

Changelog

  • Added Duration() to the task interface.