Results 984 comments of Nathaniel J. Smith

The ABC itself is A, the problem is that the specific concrete implementation in trio.testing.MockClock cheats and uses some internal private APIs beyond those provided by the ABC. And it...

For reference, [here's a minimal `Queue` that lets you select on `get`](https://gist.github.com/njsmith/40b7b7f65e5f433789153c7b668ce643). The design would also support selecting on `put` with some small tweaks. Possibly useful for extracting more general...

Maybe the key idea I needed to make the code in the previous comment work is: you need to make the actual operation happen synchronously with the reschedule, because: *...

@jchayat in chat described a use case they have for `select`-style semantics: https://gitter.im/python-trio/general?at=59b03698c101bc4e3a987289 More discussion: https://gitter.im/python-trio/general?at=59b07c66b16f26464212fe0c It sounds like at least in this case, a multi-task strategy is a viable...

There are some fun error cases to handle. If some wait setup call errors, then you have to go and abort all the previous wait setup calls to unwind One...

Oh, another fun case: if we want to support this for `ParkingLot`, and in particular `Condition`s, then we need some replacement for the `abort_func` reassignment hack that `ParkingLot.requeue` currently uses.

Some interesting arguments against `select` as a primitive: * [Getting rid of state machines I](http://250bpm.com/blog:69) * [Getting rid of state machines II](http://250bpm.com/blog:70) * [Select statement considered harmful](http://250bpm.com/blog:72) * [Footnotes to...

Here's another place where a `nowait` might be useful. This time it's on `Stream.receive_some`: #536 I guess it'd actually be possible to have a "no wait" mode, that could handle...

In #586 (the PR for adding channels), we've run into an interesting problem that's actually closely related to this: `put_handle.put` blocks waiting for *either* someone to call `get_handle.get` *or* `put_handle.close`,...

It looks like the `accept_nowait` issue may be resolved by #636, so that may disappear as a motivating example here.