Comments (4)
How exactly does this differ from what anyio offers? In this test, for example, I do something just like that.
from anyio.
The difference is in the context. In your example socket is created and bound is async context. From there the only way to pass it back to sync context is to use threads and thread synchronization primitives. You cannot "yield" from anyio.run. I think the approach where socket is created in plain old blocking way is more versatile. But I understand that this is debatable.
from anyio.
Perhaps I do not understand the use case. Can you elaborate on that? With an (pseudocode if needed) example if possible.
from anyio.
It's been over three months without any feedback, so I'm closing this.
from anyio.
Related Issues (20)
- Anyio run with pytest but wasn't asked for it HOT 6
- Don't wrap exceptions in `ExceptionGroup` if only one exception is raised on Python<3.11 HOT 10
- `run_process` with `fail_after` causes RuntimeError on timeout
- `ClosedResourceError` vs. `BrokenResourceError` is sometimes backend-dependent, and is sometimes not raised at all (in favor of a non-AnyIO exception type)
- Add `deliver_cancel` parameter and `start` support to `run_process`
- Suspicion of flaky test: test_cancelscope_propagation_when_abandoned HOT 1
- Stricter typing for `TaskGroup.start()` HOT 1
- Cancelling a TaskGroup in which a task is starting all also cancel the TaskGroup in which it is due to run HOT 4
- [pytest] support keeping event loop for higher scope HOT 10
- Restore signal handlers at the end of `open_signal_receiver`. HOT 3
- service name not available for the specified socket type HOT 19
- RuntimeError when using Ctrl+C while awaiting a task using `await TaskGrup.start()` HOT 4
- 100% CPU load after cancel HOT 11
- run_process fails when running from .exe console_script entrypoint on windows HOT 2
- Different cancel scope behaviour on asyncio vs Trio HOT 2
- Hypothesis tests that are class members are passed self twice HOT 1
- TCP listener handler does not disconnect on EOF (netcat -N) HOT 7
- Using `request.getfixturevalue` triggers errors "This event loop is already running" HOT 1
- Raising an error inside a task of a task group can produce: `RuntimeError: called 'started' twice on the same task status` HOT 7
- Cancelling `TaskGroup.start()` cancels `TaskGroup` itself (only for `asyncio` backend) HOT 4
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 anyio.