Skip to content

Commit c58f652

Browse files
committed
Add some notes about design goals
1 parent 16773b0 commit c58f652

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

readme.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,33 @@ This contains various async utility functions I've written
66

77
Things now have initial documentation, but no rendered docs site, examples, or
88
prose yet.
9+
10+
# Design goals
11+
12+
## The obvious use should be correct
13+
14+
Examples of this:
15+
16+
- Any caveats should be documented prominently.
17+
- Internally wrapping user functions should retain features
18+
such as laziness and backpressure (see: gen_transform.py)
19+
- If the library can't correctly wrap behavior, it shouldn't wrap that behavior.
20+
21+
## Pay for only what you use
22+
23+
This library is designed so that you only pay for the abstractions you use, without
24+
breaking potential interaction with other library uses.
25+
26+
This includes:
27+
28+
- imports are namespaced, (inspect import is incurred only if you import task_cache).
29+
- typing imports are resolvable at runtime.
30+
- typing imports are lazily evaluated (see _typings.py).
31+
- Some classes/functions with only minor variations are intentionally duplicated partially.
32+
- possibly more things I'm forgetting right now.
33+
34+
## Task cancellation should only ocur where obvious and documented
35+
36+
There's not much further to say about this goal right now, but this
37+
should be expanded on later in the WIP accompanying guide on making
38+
concurrent systems written in python fault tolerant at scale.

0 commit comments

Comments
 (0)