Skip to content

Commit 81760dd

Browse files
committed
Clarify documentation
- Better description of what a spec is in the README.md - Clarification about thread-safe and aio containers
1 parent 6c21439 commit 81760dd

3 files changed

Lines changed: 9 additions & 1 deletion

File tree

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@ wired = Wiring(spec)
4040
service = wired.service() # Lazy instantiation + caching
4141
```
4242

43+
`spec` is a plain dictionary. It can be written in Python, or come from a
44+
[config file](docs/user-guide/configuration-files.md), apywire doesn't care.
45+
4346
## Documentation
4447

4548
📚 **[Full Documentation](docs/index.md)**[Getting Started](docs/getting-started.md)[API Reference](docs/api-reference.md)[Examples](docs/examples.md)
@@ -53,7 +56,7 @@ make docs-serve # http://127.0.0.1:8000
5356

5457
```bash
5558
make .venv && source .venv/bin/activate # Setup
56-
make all # Format, lint, test, build
59+
make all # Format, lint, test, build
5760
```
5861

5962
See [docs/development.md](docs/development.md) for guidelines.

docs/user-guide/async-support.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ async def main():
3838
asyncio.run(main())
3939
```
4040

41+
This is especially useful for [factory methods](docs/user-guide/advanced.md#factory-methods) that perform I/O operations.
42+
4143
## How It Works
4244

4345
When you use `.aio`, apywire wraps the object instantiation in an executor:

docs/user-guide/thread-safety.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@ wired = Wiring(spec, thread_safe=True)
3434
- Single-threaded applications
3535
- Each thread has its own `Wiring` container instance
3636

37+
Rule of thumb: If you're not sure if you need thread-safe containers, you probably
38+
don't need them.
39+
3740
## How It Works
3841

3942
apywire uses a two-level locking strategy:

0 commit comments

Comments
 (0)