await/async vs. “classic” asynchronous (callbacks)

后端 未结 2 1118
臣服心动
臣服心动 2021-02-01 08:42

So the new async CTP is very cool; it makes my life a lot easier not having to write named callback methods and makes the intent of the methods a lot clearer.

Now that I

2条回答
  •  南方客
    南方客 (楼主)
    2021-02-01 09:16

    Like anonymous functions and iterators, the async and await keywords are syntactic sugar. In a technical sense, they are no more or less efficient than the equivalent non-sugary versions. They just save you a lot of typing.

提交回复
热议问题