Asynchrony (computer programming)
Appearance
Asynchrony, in
signals, or actions instigated by a program that take place concurrently with program execution, without the program hanging to wait for results.[1] 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 processor continues executing the program. Doing so provides a degree of concurrency.[1]
A common way for dealing with asynchrony in a
subroutines that return a 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.[2]
Examples of asynchrony include the following:
- Asynchronous procedure call, a method to run a procedure concurrently, a lightweight alternative to threads.
- client-side web technologies used by the client to create asynchronous I/O web applications.
- Asynchronous method dispatch (AMD), a pool of threads and the client is put in a blocking state. Upon the completion of the task, the server is notified by a callback. The server unblocks the client and transmits the response back to the client. In case of thread starvation, clients are blocked waiting for threads to become available.
See also
References
- ^ ISBN 9781449337124.
- ^ McCool, Michael; Reinders, James; Robison, Arch (2013). Structured Parallel Programming: Patterns for Efficient Computation. Elsevier. p. 30.
- ^ ICE usage of AMD.