markdown [期货和承诺] #design_pattern

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown [期货和承诺] #design_pattern相关的知识,希望对你有一定的参考价值。

In the broadest sense,
- A future or promise can be thought of as a value that will eventually become available.
- Future is used for sychronizing program execution.
- Future acts as a proxy for an result which will be eventually available.
- The construct ( future X ) immediately returns a future for the value of the expression X and concurrently begins evaluating X. When the evaluation of X yields a value, that value replaces the future.
- A future is a placeholder object for a result that does not yet exist. A promise is a writable, single-assignment container, which completes a future. Promises can complete the future with a result to indicate success, or with an exception to indicate failure.

以上是关于markdown [期货和承诺] #design_pattern的主要内容,如果未能解决你的问题,请参考以下文章

什么是期货?

markdown JS中的eventproxy和承诺

markdown 承诺和交付(也是未来)

Markdown是啥意思啊?

markdown 回调,承诺,异步等待

markdown 承诺