Closed Elesbaan70 closed 2 years ago
Would the Managers/AbstractGeometryObservingManager
benefit from any of the NetManager
event patches you added - or even be made obsolete? (I've not checked yet, just random thought on quick glance)
Would the
Managers/AbstractGeometryObservingManager
benefit from any of theNetManager
event patches you added - or even be made obsolete?
It is possible long-term, and in my opinion that wouldn't be a bad thing. I dislike the whole paradigm of infrastructure code knowing about all of its consumers.
But AbstractGeometryObservingManager
does a lot more than NetManagerEvents
, and even where their functionality seems to overlap, there might be use cases that the existing events don't cover. So this would need to be treated as a separate project where these questions are examined carefully.
I created NetManagerEvents
because I needed lane events and because I was concerned about what I saw in LaneConnectionManager
. (I don't remember the specifics, but I believe it makes assumptions that require the segment to still be valid.) I think it's best to take a minimalist approach, shifting over to this paradigm only as the need arises.
Can we have a single threaded benchmark? there is a benchmark project.
Where are we at on this? It would probably be good to get it merged soonish if it's going to be accepted, since the conflicts with #354 are starting to get messy.
I think #1479 is more complicated and harder to fix conflicts. So after #1479 is good idea.
Core Functionality
This adds the following method to
IExtSegmentManager
:and adds a new
IExtLaneManager
with the following methods:Any existing code I could identify that did this work has been replaced with calls to the new methods. I imagine there are probably other places I didn't catch.
Added Bonus
Also, this adds a class under the
Patch
namespace,NetManagerEvents
, which patchesNetManager
to provide simple high-level event notifications that can be consumed by managers ad hoc:ExtLaneManager
uses it exclusively for monitoring network changes.ExtSegmentManager
uses it for monitoring network changes.LaneConnectionManager
has been updated to monitor theReleasingSegment
event instead of overridingHandleInvalidSegment
.The
ReleasingSegment
event will be better in many cases than usingHandleInvalidSegment
because:NetManager
operation. It's just more reliable.HandleInvalidSegment
overrides are acting on data that might not be in a valid state, which may lead to problems.NetManagerEvents.ReleasingSegment
addresses that issue.