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 operation. |
| err | error | The error to be stored in the completed future. If not nil, this indicates that the operation completed with an error. |
Returns
| Type | Description |
|---|---|
*SyncFuture | A new SyncFuture object representing a completed operation. |