From 3f9e86c37a54ab70965d480ce0bb538b4c18222a Mon Sep 17 00:00:00 2001 From: Li Jie Date: Tue, 10 Sep 2024 11:49:42 +0800 Subject: [PATCH] x --- x/async/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/x/async/README.md b/x/async/README.md index db79c8d5..7714af41 100644 --- a/x/async/README.md +++ b/x/async/README.md @@ -377,7 +377,7 @@ Introduce `async.Future[T]` type to represent an eventual completion (or failure ### Future chaining (asynchronous callbacks style) -`async.Future[T]` can be chained with `Then` method to add multiple callbacks to be executed when the operation is completed, it just runs once and calls every callbacks. Currently `Then` method can't be chained multiple times because Go doesn't support generics method (Need support `func (f Future[T]) Then[U any](f func(T) Future[U]) Future[U]`) and function overload currently, maybe implements in Go+. +`async.Future[T]` can be chained with `Then` method to add multiple callbacks to be executed when the operation is completed, it just runs once and calls every callbacks. Currently `Then` method can't be chained multiple times because Go doesn't support generics method (Need support `func (f Future[T]) Then[U any](f func(T) Future[U]) Future[U]`), maybe implements in Go+. ### Future waiting (synchronous style)