Asynchrony (computer programming): Difference between revisions

Content deleted Content added
top: Fixed grammar
Tags: canned edit summary Mobile edit Mobile app edit Android app edit
Citation bot (talk | contribs)
Add: isbn. | Use this bot. Report bugs. | Suggested by Whoop whoop pull up | #UCB_webform 1098/3352
Line 1:
{{Short description|Computer programming technique}}
<!-- DO NOT ADD DISAMBIGUATION TAGS TO THIS PAGE (per [[WP:INCOMPDAB]] and [[WP:DABCONCEPT]]) -->
'''Asynchrony''', in [[computer programming]], refers 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 |isbn=9781449337124 |url=https://books.google.com/books?id=xT45qhFrVnUC}}</ref> [[Asynchronous I/O|Asynchronous input/output]] is an example of the latter case 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 that return a [[futures and promises|future or promise]] that represents the ongoing operation, and a synchronizing operation that blocks until the future or promise 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>