1
0
mirror of https://github.com/danog/amp.git synced 2024-12-02 09:27:46 +01:00
amp/docs
2017-05-16 18:51:48 +02:00
..
cancellation Add basic cancellation docs 2017-05-16 18:51:48 +02:00
coroutines Add basic coroutine docs, closes #90 2017-05-04 12:23:54 +02:00
event-loop Add notes about timer drift, fixes #80 2017-05-03 15:50:03 +02:00
iterators Add additional inter-docs links 2017-05-03 12:49:56 +02:00
promises Add additional inter-docs links 2017-05-03 12:49:56 +02:00
utils Add additional inter-docs links 2017-05-03 12:49:56 +02:00
README.md Remove already documented items from managing-concurrency.md 2017-05-03 13:12:42 +02:00

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, 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.