Skip to content

Commit bc23d24

Browse files
authored
Update README.md
1 parent 5394066 commit bc23d24

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,9 @@ Can be found at: http://dcarp.github.io/asynchronous/index.html
2222
* it is not web-oriented, compatible with `std.socket`
2323
* arguably nicer API
2424
* 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.
25+
* uses `@Coroutine` UDA to mark functions that could trigger a task (fiber) switch, although this is not enforced yet by the compiler.
2626

2727
#### 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.
28+
Some small examples can be found in the test directory or as unittests. For larger examples please use the Python/asyncio resources.
29+
30+
Please keep in mind that, in contrast with Python/asyncio, in D a coroutine MUST be called from within a Task, otherwise it causes a run-time error on the fiber switch. Basic rule: if not called from another coroutine, any coroutine call need to be wrapped by `ensureFuture` or `EventLoop.createTask`.

0 commit comments

Comments
 (0)