3 ms·
I think you missed this part: > [the resource handle] can only be dropped between event callbacks, wlroots/Wayland is callback based So "at any time" means be
by scatters 8y ago
I think you missed this part:
> [the resource handle] can only be dropped between event callbacks, wlroots/Wayland is callback based
So "at any time" means between any two user callbacks, but not during them.
Error states really aren't a solution IMO, as they tend to pollute the entire interface in that methods that would be expected to work unconditionally can now fail or panic. Either you have to check each method invocation (entirely unnecessarily, since if a resource isn't in an error state at the start of your callback it won't go into one during it) or you make the absence of error state a precondition, in which case you're guaranteed to miss one or two cases and panic when the user yanks out the cord.
- quietbritishjim 8y ago> > [the resource handle] can only be dropped between event callbacks, wlroots/Wayland is callback based Thanks, that certainly makes a hell of a lot more sense.