Please note that the content of this book primarily consists of articles
available from Wikipedia or other free sources online. In
(multithreaded) object-oriented programming, asynchronous method
invocation (AMI), also known as asynchronous method calls or
asynchronous pattern is a design pattern for asynchronous invocation of
potentially long-running methods of an object. It is equivalent to the
IOU pattern described in 1996 by Allan Vermeulen. The event-based
asynchronous pattern in .NET Framework and the
java.util.concurrent.FutureTask class in Java use events to solve the
same problem. This pattern is a variant of AMI whose implementation
carries more overhead, but it is useful for objects representing
software components. In most programming languages a called method is
executed synchronously, i.e. in the thread of execution from which it is
invoked. If the method needs a long time to completion, e.g. because it
is loading data over the internet, the calling thread is blocked until
the method has finished. When this is not desired, it is possible to
start a "worker thread" and invoke the method from there.