dbo:abstract |
In multithreaded computer programming, asynchronous method invocation (AMI), also known as asynchronous method calls or the asynchronous pattern is a design pattern in which the call site is not blocked while waiting for the called code to finish. Instead, the calling thread is notified when the reply arrives. Polling for a reply is an undesired option. (en) 异步方法调用或异步方法模式是(多线程)面向对象程序设计中用于异步调用对象的潜在的长期运行方法的一种设计模式。它等价于Allan Vermeulen提出的IOU模式。 基于事件的异步模式是异步方法调用的一个变种,开销更大但能更好的表现软件组件对象。.NET框架和Java中的java.util.concurrent.FutureTask类中使用的基于事件的异步模式使用事件来解决同样的问题。 大部分编程语言中对方法的调用是同步执行的。例如在线程执行体内,即线程的调用函数中,方法的调用就是同步执行的。如果方法需要很长的时间来完成,比方说从Internet加载数据的方法,调用者线程将被阻塞直到方法调用完成。如果不希望调用被阻塞,则可以通过创建新的worker线程并在worker线程中调用方法,在大多数编程环中上这样做可能需要很长的一段代码,尤其是需要小心处理线程过多的额外开销。异步方法调用它通过使用一种立即返回的异步的变体并提供额外的方法来支持接受完成通知以及完成等待改进长期运行的(同步)方法。 活动对象(active object)设计模式通常使用异步方法调用。异步方法调用的一个替代方案是同步的方法调用和未来对象(future object)模式。在Web浏览器的实现上可以采用异步方法调用,例如浏览器需要在Web页面中的图像加载完成之前将页面显示出来。 (zh) |
dbo:wikiPageExternalLink |
http://articles.techrepublic.com.com/5100-10878_11-1044325.html https://archive.org/details/programmingwpfbu00sell%7Curl-access=limited%7Cauthor1=Chris https://archive.org/details/programmingwpfbu00sell/page/n773 |
dbo:wikiPageID |
19662248 (xsd:integer) |
dbo:wikiPageLength |
10970 (xsd:nonNegativeInteger) |
dbo:wikiPageRevisionID |
1092397483 (xsd:integer) |
dbo:wikiPageWikiLink |
dbc:Threads_(computing) dbr:.NET_Framework dbr:Object_(computer_science) dbr:Component-based_software_engineering dbr:Computer_programming dbr:Active_object dbr:Futures_and_promises dbr:Procedure_(computer_science) dbr:Asynchronous_procedure_call dbr:Asynchrony_(computer_programming) dbr:Java_(programming_language) dbc:Software_design_patterns dbr:Blocking_(computing) dbr:Software_design_pattern dbr:Method_(computer_science) dbr:Event_(synchronization_primitive) dbr:Thread_(computer_science) |
dbp:wikiPageUsesTemplate |
dbt:Cite_book dbt:Short_description dbt:Design_Patterns_patterns |
dcterms:subject |
dbc:Threads_(computing) dbc:Software_design_patterns |
gold:hypernym |
dbr:Support |
rdf:type |
yago:WikicatSoftwareDesignPatterns yago:Abstraction100002137 yago:Cognition100023271 yago:Form105930736 yago:PsychologicalFeature100023100 dbo:Organisation yago:Structure105726345 |
rdfs:comment |
In multithreaded computer programming, asynchronous method invocation (AMI), also known as asynchronous method calls or the asynchronous pattern is a design pattern in which the call site is not blocked while waiting for the called code to finish. Instead, the calling thread is notified when the reply arrives. Polling for a reply is an undesired option. (en) 异步方法调用或异步方法模式是(多线程)面向对象程序设计中用于异步调用对象的潜在的长期运行方法的一种设计模式。它等价于Allan Vermeulen提出的IOU模式。 基于事件的异步模式是异步方法调用的一个变种,开销更大但能更好的表现软件组件对象。.NET框架和Java中的java.util.concurrent.FutureTask类中使用的基于事件的异步模式使用事件来解决同样的问题。 大部分编程语言中对方法的调用是同步执行的。例如在线程执行体内,即线程的调用函数中,方法的调用就是同步执行的。如果方法需要很长的时间来完成,比方说从Internet加载数据的方法,调用者线程将被阻塞直到方法调用完成。如果不希望调用被阻塞,则可以通过创建新的worker线程并在worker线程中调用方法,在大多数编程环中上这样做可能需要很长的一段代码,尤其是需要小心处理线程过多的额外开销。异步方法调用它通过使用一种立即返回的异步的变体并提供额外的方法来支持接受完成通知以及完成等待改进长期运行的(同步)方法。 活动对象(active object)设计模式通常使用异步方法调用。异步方法调用的一个替代方案是同步的方法调用和未来对象(future object)模式。在Web浏览器的实现上可以采用异步方法调用,例如浏览器需要在Web页面中的图像加载完成之前将页面显示出来。 (zh) |
rdfs:label |
Asynchronous method invocation (en) 异步方法调用 (zh) |
owl:sameAs |
freebase:Asynchronous method invocation yago-res:Asynchronous method invocation wikidata:Asynchronous method invocation dbpedia-hu:Asynchronous method invocation dbpedia-zh:Asynchronous method invocation https://global.dbpedia.org/id/4Suad |
prov:wasDerivedFrom |
wikipedia-en:Asynchronous_method_invocation?oldid=1092397483&ns=0 |
foaf:isPrimaryTopicOf |
wikipedia-en:Asynchronous_method_invocation |
is dbo:wikiPageRedirects of |
dbr:The_Task-based_Asynchronous_Pattern dbr:Asynchronous_error_reporting dbr:Asyncronious_error_reporting_pattern dbr:Asyncronous_error_reporting dbr:Event-Based_Asynchronous_Pattern dbr:Event-based_Asychronous_Pattern dbr:Event-based_Asynchronous_Pattern |
is dbo:wikiPageWikiLink of |
dbr:The_Task-based_Asynchronous_Pattern dbr:Jakarta_Enterprise_Beans dbr:GraphBLAS dbr:Active_object dbr:Distributed_data_flow dbr:Asynchronous_Server_Gateway_Interface dbr:API dbr:Software_design_pattern dbr:Message_queue dbr:Asynchronous_error_reporting dbr:Asyncronious_error_reporting_pattern dbr:Asyncronous_error_reporting dbr:Event-Based_Asynchronous_Pattern dbr:Event-based_Asychronous_Pattern dbr:Event-based_Asynchronous_Pattern |
is foaf:primaryTopic of |
wikipedia-en:Asynchronous_method_invocation |