Asynchrony (computer programming): Difference between revisions

Content deleted Content added
updated grammer
Tags: Reverted Visual edit
No edit summary
Line 1:
<!-- DO NOT ADD DISAMBIGUATION TAGS TO THIS PAGE (per [[WP:INCOMPDAB]] and [[WP:DABCONCEPT]]) -->
'''Asynchrony''', in [[computer programming]], referrefers to the occurrence of events independent of the main [[control flow|program flow]] and ways to deal with such events. These may be "outside" events such as the arrival of [[Unix signal|signals]], or actions instigated by a program that take place [[concurrent computing|concurrently]] with program execution, without the program ''[[hang (computing)|blocking]]'' to wait for results.<ref name="davies">{{cite book |title=Async in C# 5.0 |first=Alex |last=Davies |publisher=O'Reilly |year=2012 |pages=1–2 |url=https://books.google.com/books?id=xT45qhFrVnUC}}</ref> [[Asynchronous I/O|Asynchronous input/output]] is an example of the latter cause of asynchrony, and lets programs issue commands to storage or network devices that service these requests while the [[Central processing unit|processor]] continues executing the program. Doing so provides a degree of [[parallel computing|parallelism]].{{r|davies}}
 
A common way for dealing with asynchrony in a [[application programming interface|programming interface]] is to provide [[subroutine]]s (methods, functions) that return to their caller an object, sometimes called a [[futures and promises|future or promise]], that represents the ongoing events. Such an object will then typically come with a synchronizing operation that blocks until the operation is completed. Some programming languages, such as [[Cilk]], have special syntax for expressing an asynchronous procedure call.<ref name="spp">{{cite book |first1=Michael |last1=McCool |first2=James |last2=Reinders |first3=Arch |last3=Robison |title=Structured Parallel Programming: Patterns for Efficient Computation |publisher=Elsevier |year=2013 |pages=30}}</ref>