Asynchronous procedure call

Short description: Unit of work in a computer

This article relies largely or entirely on a single source. Please help improve this article by introducing citations to additional sources.
Find sources: "Asynchronous procedure call" – news · newspapers · books · scholar · JSTOR (March 2017)

|

An asynchronous procedure call (APC) is a unit of work in a computer.

## Contents

* 1 Definition
* 2 Structure
* 3 Implementations
* 4 See also
* 5 References

## Definition

Procedure calls can be synchronous or asynchronous. Synchronous procedure calls are made on one thread in a series, with each call waiting for the prior call to complete. on some thread. APCs instead are made without waiting for prior calls to complete.

For example, if some data are not ready (for example, a program waits for a user to reply), then stopping other activity on the thread is expensive, the thread has consumed memory and potentially other resources.

## Structure

An APC is typically formed as an object with a small amount of memory and this object is passed to a service which handles the wait interval, activating it when the appropriate event (e.g., user input) occurs.

The life cycle of an APC consists of 2 stages: the passive stage, when it passively waits for input data, and active state, when that data is calculated in the same way as at the usual procedure call.

A reusable asynchronous procedure is termed actor. In the actor model, two ports are used: one to receive input, and another (hidden) port to handle the input. In dataflow programming, many ports are used, passing to an execution service when all inputs are present.

## Implementations

In Windows, APC is a function that executes asynchronously in the context of a specific thread.[1] APCs can be generated by the system (kernel-mode APCs) or by an application (user mode APCs).[1]

## See also

* Signal

## References

1. ↑ 1.0 1.1 "Asynchronous Procedure Calls (Windows)". https://msdn.microsoft.com/en-us/library/windows/desktop/ms681951(v=vs.85).aspx.

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Asynchronous procedure call. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Asynchronous_procedure_call&oldid=4296267"