-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make OperationalDeviceProxy
shareable by multiple applications, and delivers its callbacks to multiple applications
#19259
Comments
The plan is to stop passing The use of |
I'm not clear how it resolves problem 1. The In I'm really frustrated dealing with object freeing itself inside its member function. can we just give |
Anything that releases the context should Cancel() the callback, no? That's why we are using cancelables here.... I thought you meant the pointer to the OperationalDeviceProxy could dangle, for point 1.
Problem 2.2 is what "just pass in the session instead" will solve, right?
Sure.
Again, the plan is to not have OperationalDeviceProxy at all in a way that is visible outside CASESessionManager.... Giving it a refcount would not really solve the issues here, by the way; who would be refcounting it and from where? |
@bzbarsky-apple When trying to solve problem 2.2, the So I have to change |
Just synced up with @kghost to clarify all of this:
|
I'm labelling this 1.0 since this will become more imperative when we have multiple consumers of |
@kghost Just to allay the ClusterBase concern: those are stack-only objects in practice. |
This is not completed. #19673 just unblocks the core work for this issue. |
As part of addressing this, we should also remove |
SVE/Cert Blocker Review: Does not appear to be blocking a test case, removing SVE. |
Problem
If an application context is released before the pairing completes, will render the pointer passed intoOnDeviceConnected
danglingOperationalDeviceProxy::DequeueConnectionCallbacks
we may use member fields which is already destructedcb->mCall(cb->mContext, mPeerId, error)
this
object may already destructed by previous callback, somPeerId
may not valid herecb->mCall(cb->mContext, this)
this
may not valid hereProposed Solution
Implement a type-safe and RAII style callback queue usingIntrusiveList
to solve problem 1DequeueConnectionCallbacks
, split the function into 2 parts:The text was updated successfully, but these errors were encountered: