windows: stabilise inherit_handles - #161163
Conversation
21d6ccb to
5aeecbd
Compare
|
I'd like to bikeshed the name |
The current Unix equivalent is just I would prefer we keep the name I do however think we need to be sure that in stabilising this we aren't closing off any potential other APIs for handle inheritance. Or if we are then we're happy to do so. Should this override other APIs that may want to set it? Or should it be given the lowest priority? Or should it be a "last one wins" situation. |
|
I think this shouldn't exclude any other proposals and I see it as a convenience method that just so happens to be stabilisable before the more complex one. In my mind the semantics are that there is one list of handles to inherit, and this method has the effect of clearing/filling that list (so, last one wins). it would be shorthand for |
I would note that |
|
Thanks for starting this process (heh). I do think there is indeed something to figure out about the potential interactions it could have with such a future API. Personally, I find APIs that successfully abstract away from the lower-level stuff to be nice when they plug in well to the higher-level stuff (for example Rust semantics in general), but ones that explicitly don't do that in certain cases to be nicer if they regard relatively low-level stuff that is not very well controlled anyway. I think the current case could be akin to the latter. I guess a good way to decide that would be to determine the following: is there really a need to couple the two APIs together somehow? That is to say: what would happen if the two were to be implemented completely independently of one another in terms of low-level stuff? Would it lead to easily-avoidable errors or misuses that a better API could help remove entirely or would it just work, i.e. unused parameters are just ignored by the Windows API? That might require experimentation to be sure. Obviously, ignored parameters could be considered as a blocking issue by itself because they would represent a form of request or intent from the user that is not respected in the end, so could just lead to confusion. Listing the cases:
So in summary, both "Last one wins" could be a strategy to resolve the conflicting cases instead of this, but I'm not sure it would be the greatest if assigning particular semantics to each method is desired like done above. It would be much simpler though, so could be better than the above that could be deemed too convoluted and therefore hard to memorize. It would also be consistent with same-method repetitions. In any case though, I don't see how choosing any of these options could shape the current API differently? |
Relevant to #161158; closes #146407 (by stabilising it). See my comment on the tracking issue.
r? libs