Comments (2)
While we're at it we should probably have "run local" storage too: a place to stash stuff that's local to this run, and which automatically disappears when the run ends. Example: the getaddrinfo
semaphore (#10).
Technically this is possible to fake already by using thread-local storage + a system task for notification of the run shutdown, but there's no reason to make this that difficult.
from trio.
Then again, it's also possible to fake run-local storage by just setting a task-local storage key early on (like in your main task) and then letting it be inherited by all child tasks... though this does waste some memory if you have lots of tasks.
from trio.
Related Issues (20)
- `pyright` does not understand `trio.open_memory_channel[int](0)` HOT 5
- trio.TrioInternalError when sync func run with trio.to_thread.run_sync returns HOT 10
- CI changes HOT 9
- TaskStatus.started() being a no-op if cancelled can cause deadlocks HOT 2
- `abandon_on_cancel` for async functions? HOT 1
- Test invocation fails with Python 3.13.0~alpha2 HOT 2
- Cython has defeated our Cython workaround HOT 5
- Failing to import if_indextoname on Android HOT 2
- When bumping sphinx, remove FrameType workaround in docs/source/conf.py
- Remove `UnboundedQueue` HOT 1
- Exception semantics of run_process with strict_exception_groups HOT 15
- Ensure that our docs present `strict_exception_groups=True` as the natural default HOT 7
- Recording Pypy Segfaults in Testing HOT 12
- [Heads up] Test failures with Python 3.13.0a3 HOT 20
- AttributeError: module 'trio' has no attribute 'MultiError' HOT 7
- Switch to ``uv`` in CI HOT 7
- Gunicorn worker fails to boot due to NotImplementedError HOT 4
- Please switch to v1.0 and start using semantic version numbers HOT 17
- Could this lib I made be added to the Awesome Libraries page? HOT 3
- Using trio with httpx in a basic example works. In a basic locust script it fails with `NotImplementedError: unsupported platform` HOT 11
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from trio.