python-trio Questions
1
The AnyIO library is designed to give a unified interface between asyncio and Trio. It has a TaskGroup class mimicking the Trio Nursery class. Indeed, if using Trio as the backend, it is just an al...
Theiss asked 26/2, 2024 at 11:16
3
Solved
When using trio and nursery objects, how do you capture any value that was returned from a method?
Take this example from the trio website:
async def append_fruits():
fruits = []
fruits.append(...
Counterpressure asked 28/7, 2018 at 2:9
5
Solved
I wrote a script that uses a nursery and the asks module to loop through and call an API based upon the loop variables. I get responses but don't know how to return the data like you would with asy...
Winglet asked 5/10, 2018 at 18:25
2
Solved
Raymond Hettinger gave a talk on concurrency in python, where one of examples looked like that:
import urllib.request
sites = [
'https://www.yahoo.com/',
'http://www.cnn.com',
'http://www.pyth...
Comedian asked 10/4, 2018 at 16:2
5
For an internship on the Python library fluidimage, we are investigating if it could be a good idea to write a HPC parallel application with a client/servers model using the library trio.
For asyn...
Postulant asked 4/7, 2018 at 10:11
1
Solved
I was told that the following code is not safe, because it is not allowed to have an asynchronous generator that yields from inside a nursery, except if it is an asynchronous context manager.
T = T...
Vincenz asked 9/8, 2020 at 4:59
3
Solved
asyncio has StreamReader.readline(), allowing something like:
while True:
line = await reader.readline()
...
(I don't see async for available in asyncio but that would be the obvious evolution...
Canales asked 1/12, 2018 at 23:29
3
Solved
I would like to run several tests concurrently using asyncio (/curio/trio) and pytest, but I couldn't find any information on that. Do I need to schedule them myself? And if I do, is there a way to...
Gomuti asked 4/6, 2019 at 17:3
1
Solved
I have an async function that listens on a specific port. I want to run the function on a few ports at a time and when the user wants to stop listening on a specific port, stop the function listeni...
Bibliofilm asked 13/3, 2020 at 16:34
1
Solved
I'm writing some async library and decided to support both asyncio and trio concurrency libraries to run it. I have some code that tries to be clever and do the right thing no matter which library ...
Cesspool asked 2/9, 2019 at 21:11
1
Solved
I'm doing examples to understand how it works python asynchronously. I read the Trio documentation and I thought that only one task can be executed in the loop every time and in every checkpoint th...
Drawl asked 15/8, 2018 at 9:5
1
Solved
Today, I found a library named trio which says itself is an asynchronous API for humans. These words are a little similar with requests'. As requests is really a good library, I am wondering what i...
Ole asked 26/3, 2018 at 2:7
1
Solved
I'm writing a class that will spawn tasks during its lifetime. Since I'm using Trio, I can't spawn tasks without a nursery. My first thought was to have a self._nursery in my class that I can spawn...
Hullabaloo asked 16/1, 2018 at 13:52
1
© 2022 - 2025 — McMap. All rights reserved.