Closed yakra closed 1 year ago
Route::use_list_name
and the like can handle the mutexes itself, and be easier on the eyes here. And maybe even save us some dereferencing?r1
and r2
must be in the same ConnectedRoute & thus the same system.
Therefore we can insert & erase both lookup1
and lookup2
in tandem within the same lock/unlock operations.std::string
-based fields
, erase from the unused sets first, then use std::move
to insert into the in-use sets (see https://github.com/TravelMapping/DataProcessing/issues/466#issuecomment-1378118302).
r1
and r2
must be in the same ConnectedRoute & thus the same system.
Therefore we can insert & erase both lookup1
and lookup2
in tandem within the same lock/unlock operations.
https://github.com/yakra/DataProcessing/blob/869e35c1d4c3cb729b3475619163071c3ecc8d9b/siteupdate/cplusplus/classes/TravelerList/mark_chopped_route_segments.cpp#L92-L105
https://github.com/yakra/DataProcessing/blob/869e35c1d4c3cb729b3475619163071c3ecc8d9b/siteupdate/cplusplus/classes/TravelerList/mark_connected_route_segments.cpp#L178-L201
2 mutexes per HighwaySystem & 2 per Route, used back-to-back. Could consolidating to 1 each save time by performing fewer lock/unlock operations?