On Tue, Nov 10, 2020 at 11:54:07AM +0000, Tom Parkin wrote: > On Mon, Nov 09, 2020 at 23:51:53 +0100, Guillaume Nault wrote: > > BTW, shouldn't we have an "UNBRIDGE" command to remove the bridge > > between two channels? > > I'm not sure of the usecase for it to be honest. Do you have > something specific in mind?
I don't know if there'd be a real production use case. I proposed it because, in my experience, the diffucult part of any new feature is the "undo" operation. That's where many race conditions are found. Having a way to directly revert a BRIDGE operation might help testing the undo path (otherwise it's just triggered as a side effect of closing a file descriptor). I personally find that having symmetrical "do" and "undo" operations helps me thinking precisely about how to manage concurency. But that's probably a matter of preference. And that can even be done without exposing the "undo" operation to user space (it's just more difficult to test). Anyway, that was just a suggestion. I have no strong opinion. > Thanks very much for your review and comments, it's much appreciated > :-) Thanks! :)