AsyncBinding provides the implementation of an asynchronous overload. The provided function is called in its own goroutine with the provided context. The function should block until the result is available, and the framework manages goroutine and channel lifecycle. This follows the same pattern use
(fn functions.BlockingAsyncOp)
| 363 | // AsyncMaxConcurrency) until it returns on its own. For functions that may hang or that are not |
| 364 | // under your control, wrap them with async.TimeoutBinding to bound their runtime. |
| 365 | func AsyncBinding(fn functions.BlockingAsyncOp) OverloadOpt { |
| 366 | return decls.AsyncBinding(fn) |
| 367 | } |
| 368 | |
| 369 | // SingletonAsyncBinding creates a singleton async function definition from a blocking function, |
| 370 | // to be used with all function overloads. The provided function is called in its own goroutine |