Matthias Urlichs

Results 342 comments of Matthias Urlichs

OK, fair enough. However, models should describe their data exhaustively. Thus it makes sense to forbid random elements. The easiest way to specify that is to not mention it in...

The CUPS driver model is somewhat unsuited to those label printers. One example: you can ask the printer which label size is currently loaded but there's no way for the...

There is no `add_callback` function in asyncio, so no wonder `trio_asyncio` doesn't have one either.

Ugh. I'm not running any sort of dask server, so when I thy I get this: ``` OSError: Timed out trying to connect to 'tcp://127.0.0.1:60590' after 10 s: in :...

OK, I've looked at the code a bit, particularly that of Tornado. Bottom line: I do think it's possible to teach Tornado to be compatible with trio-asyncio, but it would...

Another reason for the problem is that, while you did open a trio_asyncio loop, you're still in Trio context when you call `await loop.subprocess_exec()`. You need to wrap that in...

`call_soon_threadsafe` is indeed the preferred solution. asyncio's threadsafe version writes a wake-up byte to asyncio's internal buffer, which _is_ required in this situation – garbage collection might be triggered from...

> Another useful piece of evidence would be to check how expensive it would actually be to make call_soon an alias for call_soon_threadsafe. A microbenchmark on my dev VM reports...

I did measure the whole thing: ``` import trio import trio_asyncio import asyncio from time import process_time as time class N: def __init__(self, n): self.n = n self.e = asyncio.Event()...