mirror of
https://github.com/danog/amp.git
synced 2024-11-30 04:29:08 +01:00
5f3c0620a6
Merged a small part into the initial docs/README.md, most parts were already documented elsewhere. Generator docs might be helpful for building the coroutines documentation.
15 lines
1.0 KiB
Markdown
15 lines
1.0 KiB
Markdown
# 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:
|
|
|
|
1. Get smarter (not feasible);
|
|
2. Abstract concurrent task execution to make it feel synchronous.
|
|
|
|
Amp provides an [event loop](./event-loop/README.md), [promises](./promises/README.md) and [asynchronous iterators](./iterators/README.md) as building blocks for (fully) asynchronous libraries and applications. [Coroutines](./coroutines/README.md) make asynchronous code feel as synchronous as synchronous code.
|
|
|
|
Start with the [Introduction to Event Loops](./event-loop/).
|