minor package and README updates
This commit is contained in:
parent
54327432fa
commit
d60250eb8b
19
README.md
19
README.md
@ -3,6 +3,8 @@
|
||||
simple event-based model over core Python utilities like `ThreadPoolExecutor` to
|
||||
facilitate reactivity and manage concurrent responses.
|
||||
|
||||
![High-level execution flow diagram](docs/_static/execlib.png)
|
||||
|
||||
There are a few top-level classes exposed by the package:
|
||||
|
||||
- **Router**: Central event routing object. Routers facilitate route registration,
|
||||
@ -17,3 +19,20 @@ There are a few top-level classes exposed by the package:
|
||||
iNotify to dynamically respond to file events.
|
||||
- **Server**: Long-running process manager for listeners and optional live-reloading via
|
||||
HTTP. Interfaces with listener `start()` and `shutdown()` for graceful interruption.
|
||||
|
||||
# Install
|
||||
```sh
|
||||
pip install execlib
|
||||
```
|
||||
|
||||
# Development
|
||||
|
||||
## Documentation
|
||||
```sh
|
||||
pip install execlib[docs]
|
||||
```
|
||||
|
||||
## Testing
|
||||
```sh
|
||||
pip install execlib[tests]
|
||||
```
|
||||
|
BIN
docs/_static/execlib.png
vendored
Normal file
BIN
docs/_static/execlib.png
vendored
Normal file
Binary file not shown.
After Width: | Height: | Size: 331 KiB |
@ -860,14 +860,15 @@ class Router[E: Event]:
|
||||
|
||||
# manually track and cancel pending futures b/c `.shutdown(cancel_futures=True)`
|
||||
# is misleading, and will cause an outer `as_completed` loop to hang
|
||||
for future in tqdm(
|
||||
list(self._active_futures),
|
||||
desc=color_text(
|
||||
f'Cancelling {len(self._active_futures)} pending futures...',
|
||||
Fore.BLACK, Back.RED),
|
||||
colour='red',
|
||||
):
|
||||
future.cancel()
|
||||
if self._active_futures:
|
||||
for future in tqdm(
|
||||
list(self._active_futures),
|
||||
desc=color_text(
|
||||
f'Cancelling {len(self._active_futures)} pending futures...',
|
||||
Fore.BLACK, Back.RED),
|
||||
colour='red',
|
||||
):
|
||||
future.cancel()
|
||||
|
||||
if self._thread_pool_2 is not None:
|
||||
# cancel pending futures (i.e., those not started)
|
||||
|
@ -43,6 +43,7 @@ docs = [
|
||||
"furo",
|
||||
"myst-parser",
|
||||
]
|
||||
jupyter = ["ipykernel"]
|
||||
|
||||
[project.urls]
|
||||
Homepage = "https://doc.olog.io/execlib"
|
||||
|
Loading…
Reference in New Issue
Block a user