Hi, > +1 for having a function that just releases all resources in a resource > owner in one call. I don't think it's performance critical so it could > just call ResourceOwnerRelease() three times. > ReleaseAuxProcessResources() could make use of it too. >
Thank you for the feedback. I am working on a patch for this and will post it soon. > > > Removing ResourceOwnerReleaseAllOfKind will also help get rid of one > > of the flags "releasing" or "sorted" in ResourceOwnerData. > > You still need those flags when you release in phases. I don't see us > getting rid of the three phases in the usual transaction-scoped resource > owners any time soon, even if some resource owners don't need them. > We do need one of these flags, but not both, for phased release to work. I don't see any occurrence of these flags where one is true and the other is false except for the ResourceOwnerReleaseAllOfKind() function. Both flags are set simultaneously when entering the release phase. The following comment in ResourceOwnerData also shows that we have separate flags only due to the ResourceOwnerReleaseAllOfKind() function. * We have separate flags because * ResourceOwnerReleaseAllOfKind() temporarily sets 'releasing' without * sorting the arrays. Thank you, Rahila Syed
