Skip to content

Commit 781ffc6

Browse files
committed
PRIMITIVES.md various improvements.
1 parent 9849e3e commit 781ffc6

File tree

1 file changed

+14
-14
lines changed

1 file changed

+14
-14
lines changed

PRIMITIVES.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,28 @@ obvious workround is to produce a version with unused primitives removed.
1717
1.2 [Task control and monitoring](./PRIMITIVES.md#12-task-control-and-monitoring)
1818
2. [Modules](./PRIMITIVES.md#2-modules)
1919
3. [Synchronisation Primitives](./PRIMITIVES.md#3-synchronisation-primitives)
20-
3.1 [Function launch](./PRIMITIVES.md#31-function-launch)
21-
3.2 [Class Lock](./PRIMITIVES.md#32-class-lock)
20+
3.1 [Function launch](./PRIMITIVES.md#31-function-launch) Launch a function or a coro interchangeably.
21+
3.2 [Class Lock](./PRIMITIVES.md#32-class-lock) Ensure exclusive access to a shared resource.
2222
3.2.1 [Definition](./PRIMITIVES.md#321-definition)
23-
3.3 [Class Event](./PRIMITIVES.md#33-class-event)
23+
3.3 [Class Event](./PRIMITIVES.md#33-class-event) Pause a coro until an event occurs.
2424
3.3.1 [Definition](./PRIMITIVES.md#331-definition)
25-
3.4 [Class Barrier](./PRIMITIVES.md#34-class-barrier)
26-
3.5 [Class Semaphore](./PRIMITIVES.md#35-class-semaphore)
25+
3.4 [Class Barrier](./PRIMITIVES.md#34-class-barrier) Pause multiple coros until all reach a given point.
26+
3.5 [Class Semaphore](./PRIMITIVES.md#35-class-semaphore) Limit number of coros which can access a resource.
2727
3.5.1 [Class BoundedSemaphore](./PRIMITIVES.md#351-class-boundedsemaphore)
28-
3.6 [Class Condition](./PRIMITIVES.md#36-class-condition)
28+
3.6 [Class Condition](./PRIMITIVES.md#36-class-condition) Control access to a shared reource.
2929
3.6.1 [Definition](./PRIMITIVES.md#361-definition)
30-
3.7 [Class Gather](./PRIMITIVES.md#37-class-gather)
30+
3.7 [Class Gather](./PRIMITIVES.md#37-class-gather) Synchronise and collect results from multiple coros.
3131
3.7.1 [Definition](./PRIMITIVES.md#371-definition)
3232
3.7.2 [Use with timeouts and cancellation](./PRIMITIVES.md#372-use-with-timeouts-and-cancellation)
33-
4. [Task Cancellation](./PRIMITIVES.md#4-task-cancellation)
34-
4.1 [Coro sleep](./PRIMITIVES.md#41-coro-sleep)
35-
4.2 [Class Cancellable](./PRIMITIVES.md#42-class-cancellable)
36-
4.2.1 [Groups](./PRIMITIVES.md#421-groups)
33+
4. [Task Cancellation](./PRIMITIVES.md#4-task-cancellation) Methods of cancelling tasks and groups of tasks.
34+
4.1 [Coro sleep](./PRIMITIVES.md#41-coro-sleep) sleep() with reduced exception handling latency.
35+
4.2 [Class Cancellable](./PRIMITIVES.md#42-class-cancellable) Register tasks for cancellation.
36+
4.2.1 [Groups](./PRIMITIVES.md#421-groups) Group sets of tasks for cancellation.
3737
4.2.2 [Custom cleanup](./PRIMITIVES.md#422-custom-cleanup)
38-
4.3 [Class NamedTask](./PRIMITIVES.md#43-class-namedtask)
38+
4.3 [Class NamedTask](./PRIMITIVES.md#43-class-namedtask) Associate tasks with names for cancellation.
3939
4.3.1 [Latency and Barrier objects](./PRIMITIVES.md#431-latency-and-barrier-objects)
4040
4.3.2 [Custom cleanup](./PRIMITIVES.md#432-custom-cleanup)
41-
4.3.3 [Changes](./PRIMITIVES.md#433-changes)
41+
4.3.3 [Changes](./PRIMITIVES.md#433-changes) June 2018 asyn API changes affecting cancellation.
4242

4343
## 1.1 Synchronisation Primitives
4444

@@ -667,7 +667,7 @@ async def foo(arg1, arg2):
667667
```
668668

669669
The `NamedTask` constructor takes the name, the coro, plus any user positional
670-
or keyword args. Th eresultant instance can be scheduled in the usual ways:
670+
or keyword args. The resultant instance can be scheduled in the usual ways:
671671

672672
```python
673673
await NamedTask('my foo', foo, 1, 2) # Pause until complete or killed

0 commit comments

Comments
 (0)