|
1 | 1 | [](https://travis-ci.org/dcarp/asynchronous)
|
2 | 2 |
|
3 |
| -This module provides infrastructure for writing single-threaded concurrent code using coroutines, multiplexing I/O access over sockets and other resources, running network clients and servers, and other related primitives. |
| 3 | +#`asynchonous`# |
| 4 | +This library provides infrastructure for writing concurrent code using coroutines, multiplexing I/O access over sockets and other resources, running network clients and servers, and other related primitives. |
4 | 5 |
|
5 |
| -*It starts as a port of python 3 [asyncio library](https://docs.python.org/3/library/asyncio.html).* |
| 6 | +*It implements most of the python 3 [asyncio API](https://docs.python.org/3/library/asyncio.html).* |
6 | 7 |
|
7 |
| -[API Reference](http://dcarp.github.io/asynchronous/index.html) |
| 8 | +####API Reference### |
| 9 | +Can be found at: http://dcarp.github.io/asynchronous/index.html |
8 | 10 |
|
9 |
| -Implementation status: |
| 11 | +####Implementation status#### |
| 12 | +* Timers (done) |
| 13 | +* Futures, Tasks (done) |
| 14 | +* Sockets (done) |
| 15 | +* Streams (done) |
| 16 | +* Subprocesses (not implemented) |
| 17 | +* Locks and semaphores (done) |
| 18 | +* Queues (done) |
10 | 19 |
|
11 |
| -1. Timers (done) |
12 |
| -2. Futures, Tasks (done) |
13 |
| -3. Sockets (done) |
14 |
| -4. Streams (done) |
15 |
| -5. Subprocesses (not implemented) |
16 |
| -6. Locks and semaphores (done) |
17 |
| -7. Queues (done) |
| 20 | +####Why yet another async library? What wrong with vibe.d?#### |
| 21 | +* `asynchronous` is a library and not a framework |
| 22 | +* it is not web-oriented, compatible with `std.socket` |
| 23 | +* arguably nicer API |
| 24 | +* event loop start/stop control |
| 25 | +* uses @Coroutine UDA to mark functions that could trigger a task (fiber) switch, although this is not enforced by the compiler yet. |
| 26 | + |
| 27 | +####Examples and tutorials#### |
| 28 | +Some small examples can be found in the test directory or as unittests. |
| 29 | +For larger examples please use the python resources. Just keep in mind that in contrast with Python in D a coroutine MUST NOT be called from outside of a task (it causes a run-time error on fiber switch). So you may need to add `ensureFuture` or `EventLoop.createTask` on the first calling level. |
0 commit comments