Go, Generics, and Concurrency

  • Run any function asychronously
  • Wait for multiple functions to complete
  • Automatically add context cancellation support to a function
  • Take the output of one concurrent function and use it as the input for another concurrent function
cannot use generic type Promise[V any] without instantiation
<nil>
20 <nil>
30 <nil>
type *Promise[string] of p2 does not match inferred type *Promise[int] for *Promise[V]
20 <nil>

--

--

--

Former SDE at Capital One. Author of Learning Go. Interested in programming languages, open source, and the future of software engineering.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

CSS — UI Design & Development

Your first commit

How to Reinstall Windows Free? Use the HP Cloud Recovery Tool

How to test the Contactless Retail POS Systems

Serve a secure, static website with AWS

Sinatra App & Heroku

Marinade’s sponsored prize for the Solana Riptide Hackathon 2022

Labeling For Loop In Swift

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Jon Bodner

Jon Bodner

Former SDE at Capital One. Author of Learning Go. Interested in programming languages, open source, and the future of software engineering.

More from Medium

Go: Function Names and Generics

Type Stringer — Golang

Implementing a lightweight transcription microservice with gRPC

The Power of Generics in Go: The Repository pattern for GORM

The Power of Generics in Go: GORM