async.go
async
async.go | async | |
---|---|---|
2 | 3 | |
29 | 63 | |
- | - | |
10.0 | 1.8 | |
over 1 year ago | over 2 years ago | |
Go | Go | |
Apache License 2.0 | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
async.go
async
-
Retrofitting Async/Await in Go 1.18
// Taken from: https://github.com/nkcmr/async/blob/main/async.go type syncPromise[T any] struct { done chan struct{} v T err error } func (s *syncPromise[T]) Await(ctx context.Context) (T, error) { select { case <-ctx.Done(): var zerov T return zerov, ctx.Err() case <-s.done: return s.v, s.err } } func (s *syncPromise[T]) Settled() bool { select { case <-s.done: return true default: return false } }
-
Go Generics Facilitators
I made this: https://github.com/nkcmr/async so I can experiment with the idea of Promises in Go. Keep in mind it's experimental and I've only lightly played around with the pattern.
- Async: Experimental Promises in Go1.18 with Generics
What are some alternatives?
krakend-ce - KrakenD Community Edition: High-performance, stateless, declarative, API Gateway written in Go.
PIE - A behavior for Internet Explorer allowing it to recognize and render various CSS3 box decoration properties
Hunch - Hunch provides functions like: All, First, Retry, Waterfall etc., that makes asynchronous flow control more intuitive.
generic - A collection of generic data structures written in Go.
RxGo - Reactive Extensions for the Go language.
functools - Functional tools in Go 1.18 using newly introduced generics
valet - Job queuing service and async task runner.
pie - 🍕 Enjoy a slice! A utility library for dealing with slices and maps that focuses on type safety and performance.
goomerang - A small communications library based on protocol buffers over websockets
genfuncs - Go 1.18+ polymorphic generic containers and functions.
Disruptor - High Performance Inter-Thread Messaging Library
fut