Popularity
4.3
Growing
Activity
1.2
Declining
69
12
10
Programming language: Go
License: GNU General Public License v3.0 or later
Tags:
Goroutines
Latest version: v1.0.0
async alternatives and similar packages
Based on the "Goroutines" category.
Alternatively, view async alternatives based on common mentions on social networks and blogs.
-
semaphore
Semaphore pattern implementation with timeout of lock/unlock operations based on channel and context. -
Hunch
Hunch provides functions like: All, First, Retry, Waterfall etc., that makes asynchronous flow control more intuitive. -
goccm
Go Concurrency Manager package limits the number of goroutines that allowed to run concurrently. -
conexec
A concurrent toolkit to help execute funcs concurrently in an efficient and safe way.It supports specifying the overall timeout to avoid blocking and uses goroutine pool to improve efficiency. -
go-tools/multithreading
Manage a pool of goroutines using this lightweight library with a simple API. -
queue
Gives you a sync.WaitGroup like queue group accessibility. Helps you to throttle and limit goroutines, wait for the end of the all goroutines and much more. -
hands
A process controller used to control the execution and return strategies of multiple goroutines. -
concurrency-limiter
Concurrency limiter with support for timeouts , dynamic priority and context cancellation of goroutines. -
oversight
Oversight is a complete implementation of the Erlang supervision trees.
Get performance insights in less than 4 minutes
Scout APM uses tracing logic that ties bottlenecks to source code so you know the exact line of code causing performance issues and can get back to building a great product faster.
Sponsored
scoutapm.com
Do you think we are missing an alternative of async or a related project?
Popular Comparisons
README
Async
Provides a safe way to execute functions asynchronously, recovering them in case of panic. It also provides an error stack aiming to facilitate fail causes discovery, and a simple way to control execution flow without WaitGroup
.
Usage
var (
user User
songs []Songs
photos []Photos
)
err := async.Run(ctx,
func(ctx context.Context) error {
user, err = user.Get(ctx, id)
return err
},
func(ctx context.Context) error {
songs, err = song.GetByUserID(ctx, id)
return err
},
func(ctx context.Context) error {
photos, err = photo.GetByUserID(ctx, id)
return err
},
)
if err != nil {
log.Error(err)
}
You can also limit the number of asynchronous tasks
runner := async.NewRunner(tasks...).WithLimit(3)
if err := runner.Run(ctx); err != nil {
log.Error(e)
}