Coding 2022-09-29

Tags:
By Max Woerner Chase

All right, I had some fun yesterday, time to have a bit more.

Right now, the definition I want to mess with is RuntimeAction = typing.Callable[[], typing.Awaitable[tuple[_result.Result, typing.Mapping[str, str]]]]. I want it to look more like Task = typing.Callable[[Something], typing.Awaitable[_result.Result]], where Something is an interface that takes a stream name and a stream.

So, since this stuff is pretty tightly wedded to trio internals, then we have that the "stream" argument must be a trio.abc.ReceiveStream, and there are a few operations that I want to support using them. One is for calling code to enter a stream name, and block until that stream completes, then cache and return the result. The other is to have some kind of "wrapper" implementation of the interface, that has a "prefix" that it adds to calls of the underlying implementation. So, let's suppose that stream names are non-empty tuples of strings.

And...

I got distracted by other things. So, let's plan this for later:

I think this all makes sense. At least, I think so now. We'll see about later.

Good night.