.. | ||
coroutines | ||
event-loop | ||
iterators | ||
promises | ||
utils | ||
managing-concurrency.md | ||
README.md |
Documentation
This directory contains the documentation for amphp/amp
. Documentation and code are bundled within a single repository for easier maintenance. Additionally, this preserves the documentation for older versions.
Managing Concurrency
The weak link when managing concurrency is humans; we simply don't think asynchronously or in parallel. Instead, we're really good at doing one thing at a time and the world around us generally fits this model. So to effectively design for concurrent processing in our code we have a couple of options:
- Get smarter (not feasible);
- Abstract concurrent task execution to make it feel synchronous.
Amp provides an event loop, promises and asynchronous iterators as building blocks for (fully) asynchronous libraries and applications. Coroutines make asynchronous code feel as synchronous as synchronous code.
Start with the Introduction to Event Loops.