什么是异步方法调用,为什么要使用它? [英] What is an async method call and why might you use it?

查看:253
本文介绍了什么是异步方法调用,为什么要使用它?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

什么是异步方法调用以及为什么要使用它?

推荐答案

异步意味着调用将立即返回(它不会阻止).根据实现的不同,调用完成后可以(但不必)接收回调.

例如,当您向日志记录线程或Web服务方法发送日志消息,而又不关心结果时,它很有用
Async means that the call will return immediately (it will not block). Depending on implementation you can (but you don''t have to) receive a callback once the call is done.

It''s useful for example when you send a log message to a logging thread or web service method and you don''t care about results


您居住的地方Google坏了吗?

异步意味着调用代码进行呼叫,然后继续工作.同步意味着它发出呼叫并等待答复.
Google broken where you live ?

Asych means that the calling code makes the call, then keeps working. Synchronous means it makes the call and waits for a reply.


这篇关于什么是异步方法调用,为什么要使用它?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆