John Belmonte

Results 252 comments of John Belmonte

> I have an async "value wrapper" that represents something in the real world that can change its value. It has an immediate "what's its value now" property which you...

> So far, it works in practice for me. It does mean that consumers are required to keep up, or they slow the producer down. But in my case (home...

> Have you seen this long thread on broadcast channels? #987 To summarize it lightly, there's all the big thinkers in Trio pondering broadcast, and the one thing everyone agrees...

> Not all of the time, though. For example, when the motion sensor switches to True and then later to False, a notification should be guaranteed to go out whether...

Thank you @Trionista. Remaining question: does it warrant stating in the docs and/or unit tests?

Cases of MultiError in my app tend to be Cancelled combined with something else, and so far I always want to defer to Cancelled. I'm using this pattern: ```python3 try:...

@njsmith asked me to write up my exception handling use case. (I was intending to post something on the Trio forum anyway.) What I learned the hard way was to...

@mehaase I think what you want is a decorator like `@defer_to_exception(ConnectionClosed)`, where a `MultiError` with any combination of `ConnectionClosed` and `Cancelled` will yield `ConnectionClosed`. It could be generalized to take...

I tried to make an API and implementation for a general `multi_error_defer_to()` context manager mentioned previously, which accepts an ordered list of privileged exception types and coalesces a `MultiError` into...

I've published `multi_error_defer_to()` to trio-util: https://github.com/groove-x/trio-util/blob/76254159ee6710659245420b5ed2a3f446dbf83b/src/trio_util/_exceptions.py#L74-L154