Proactor is a
software design pattern
In software engineering, a software design pattern is a general, reusable solution to a commonly occurring problem within a given context in software design. It is not a finished design that can be transformed directly into source or machine c ...
for
event handling
In programming and software design, an event is an action or occurrence recognized by software, often originating asynchronously from the external environment, that may be handled by the software. Computer events can be generated or triggered ...
in which long running activities are running in an asynchronous part. A ''completion handler'' is called after the asynchronous part has terminated.
The proactor pattern can be considered to be an
asynchronous
Asynchrony is the state of not being in synchronization.
Asynchrony or asynchronous may refer to:
Electronics and computing
* Asynchrony (computer programming), the occurrence of events independent of the main program flow, and ways to deal wit ...
variant of the
synchronous
Synchronization is the coordination of events to operate a system in unison. For example, the conductor of an orchestra keeps the orchestra synchronized or ''in time''. Systems that operate with all parts in synchrony are said to be synchronou ...
reactor pattern
The reactor design pattern is an event handling pattern for handling service requests delivered concurrently to a service handler by one or more inputs. The service handler then demultiplexes the incoming requests and dispatches them synchrono ...
.
[Pattern-Oriented Software Architecture, Volume 2, Schmidt et al., Jon Wiley & Sons, Ltd, 2000]
Interaction

Operation specific actors:
* The ''Proactive Initiator'' starts the asynchronous operation via the Asynchronous Operation Processor and defines the Completion Handler
* ''Completion Handler'' is a call at the end of the operation from the Asynchronous Operation Processor
* ''Asynchronous Operation''
Standardized actors
* The ''Asynchronous Operation Processor'' controls the whole asynchronous operation
* The ''Completion Dispatcher'' handles the call, depending on the execution environment.
Implementations
Proactor and Boost.Asio(
C++)
*
Adaptive Communication Environment (
C++)
RJR(Ruby)
See also
*
Reactor pattern
The reactor design pattern is an event handling pattern for handling service requests delivered concurrently to a service handler by one or more inputs. The service handler then demultiplexes the incoming requests and dispatches them synchrono ...
(a pattern that also asynchronously queues events, but demultiplexes and dispatches them synchronously)
References
External links
Proactor - An Object Behavioral Pattern for Demultiplexing and Dispatching Handlers for Asynchronous Events Irfan Pyarali, Tim Harrison,
Douglas C. Schmidt, Thomas D. Jordan, 1997 (pdf 143 kB)
Events (computing)
Software design patterns
{{software-eng-stub