异步多线程VS - 是否有区别吗? [英] Asynchronous vs Multithreading - Is there a difference?

查看:172
本文介绍了异步多线程VS - 是否有区别吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否异步调用总是创建一个新的线程?两者有什么区别呢?

Does an asynchronous call always create a new thread? What is the difference between the two?

是否异步调用总是创建或使用一个新的线程?

Does an asynchronous call always create or use a new thread?

维基百科说

在计算机编程,异步事件是那些主程序流程的独立地发生的。异步操作是在一个非阻塞方案执行的操作,使主程序流程继续进行处理。

In computer programming, asynchronous events are those occurring independently of the main program flow. Asynchronous actions are actions executed in a non-blocking scheme, allowing the main program flow to continue processing.

我知道异步调用可针对单个线程来完成?这怎么可能?

I know async calls can be done on single threads? How is this possible?

推荐答案

此问题是织补附近过于笼统回答。

This question is darn near too general to answer.

在一般情况下,一个异步呼叫不一定创建新线程。这是一种方式来实现它,以pre-现有的线程池或外部过程是其他方式。这在很大程度上取决于语言,对象模型(如果有的话),然后运行时环境。

In the general case, an asynchronous call does not necessarily create a new thread. That's one way to implement it, with a pre-existing thread pool or external process being other ways. It depends heavily on language, object model (if any), and run time environment.

异步只是意味着调用线程不坐,等待响应,也不会异步活动调用线程发生。

Asynchronous just means the calling thread doesn't sit and wait for the response, nor does the asynchronous activity happen in the calling thread.

除此之外,你将需要得到更具体的。

Beyond that, you're going to need to get more specific.

这篇关于异步多线程VS - 是否有区别吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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