Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

Asynchrony (computer programming)

From Wikipedia, the free encyclopedia
Computer programming technique

Asynchrony, incomputer programming, refers to the occurrence of events independent of the mainprogram flow and ways to deal with such events. These may be "outside" events such as the arrival ofsignals, or actions instigated by a program that take placeconcurrently with program execution, without the programhanging 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 theprocessor continues executing the program. Doing so provides a degree ofconcurrency.[1]

A common way for dealing with asynchrony in aprogramming interface is to providesubroutines that return afuture or promise that represents the ongoing operation, and a synchronizing operation thatblocks until the future or promise is completed. Some programming languages, such asCilk, 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 tothreads.
  • Ajax is a set ofclient-sideweb technologies used by the client to create asynchronous I/Oweb applications.
  • Asynchronous method dispatch (AMD), adata communication method used when there is a need for the server side to handle a large number of long lasting client requests.[3] Using synchronous method dispatch (SMD), this scenario may turn the server into an unavailable busy state resulting in a connection failure response caused by anetwork connection requesttimeout. The servicing of a client request is immediately dispatched to an availablethread from apool 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 threadstarvation, clients are blocked waiting for threads to become available.

See also

[edit]

References

[edit]
  1. ^abDavies, Alex (2012).Async in C# 5.0. O'Reilly. pp. 1–2.ISBN 9781449337124.
  2. ^McCool, Michael; Reinders, James; Robison, Arch (2013).Structured Parallel Programming: Patterns for Efficient Computation. Elsevier. p. 30.
  3. ^ICE usage of AMD.


Stub icon

Thiscomputer science article is astub. You can help Wikipedia byexpanding it.

Retrieved from "https://en.wikipedia.org/w/index.php?title=Asynchrony_(computer_programming)&oldid=1288110412"
Categories:
Hidden categories:

[8]ページ先頭

©2009-2025 Movatter.jp