NewSyncFuture
Creates a new "completed" future that matches the async computation api
def NewSyncFuture(
val: interface{},
err: error
) - > *SyncFuture
Creates a new "completed" future that matches the async computation API.
Parameters
| Name | Type | Description |
|---|---|---|
| val | interface{} | The value to be stored in the completed future. This represents the successful result of an asynchronous operation. |
| err | error | The error to be stored in the completed future. This represents an error encountered during an asynchronous operation. |
Returns
| Type | Description |
|---|---|
*SyncFuture | A new SyncFuture object initialized with the provided value and error. |