Retrofitting Async/Await in Go 1.18

This page summarizes the projects mentioned and recommended in the original post on

Our great sponsors
  • Scout APM - Less time debugging, more time building
  • SonarQube - Static code analysis for 29 languages.
  • SaaSHub - Software Alternatives and Reviews
  • async

    experimental promises in go1.18 with generics (by nkcmr)

    // Taken from: 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 } }

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts