distributed 2021.10.0

This adds the following routes to the scheduler

In principle, the implementation logic is quite simple as we can reuse the asyncio.Event as much as possible: we keep a mapping from name to an asyncio.Event and call every function (wait, set, clear, is_set) directly on these events.

However, this would cause a memory leak: created events in the dictionary are never removed. For this, we also keep a counter for the number of waiters on a specific event. If an event is set, we need to keep track of this state so we can not remove it (the default flag is false). If it is unset but there are waiters, we can also not remove it, as those waiters would then have dangling futures. Therefore the only time we can remove the event from our dict is when the number of waiters is 0 and the event flag is cleared.

An extension for the scheduler to manage Events

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


File: /distributed/event.py#16
type: <class 'type'>
Commit: