Method Concurrent.resolve()


Method resolve

Future resolve(mixed value)

Returns

A new Future that has already been fulfilled with value as result. If value is an object which already has Future()->on_failure() and Future()->on_success() methods, return it unchanged.

Note

This function can be used to ensure values are futures.

Note

The returned Future does NOT have a backend set.

See also

Future.on_success(), Promise.success() https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/Promise