Commit Graph
6 Commits
Author SHA1 Message Date
Juliet Levesque 8a78212bb8 [Nearby Connections] Check for shutdown before accessing ClientProxy.
During the destruction of NearbyConnections, Core (which owns ClientProxy) is destructed before ServiceController (which owns EndpointManager), which means any pending tasks on the EndpointManager executor that use ClientProxy will be using
garbage memory. To fix this issue, EndpointManager::DiscardEndpoint will check
for an `is_shutdown` boolean set during ~EndpointManager before accessing
ClientProxy. The assumption is that any accessing of ClientProxy after the
destruction will be invalid.

PiperOrigin-RevId: 532581122
2023-05-16 14:54:20 -07:00
Janusz Sobczak 8f887064ec Fix dead-lock during executor shutdown
The flow below caused a dead-lock:
1. A lengthy task A is running on an executor.
2. Executor is destructed, or `Shutdown()` on another thread. The call blocks
   waiting for A to complete.
3. Task A executes another task B on the executor. The call blocks forever.

PiperOrigin-RevId: 517495348
2023-03-17 13:34:57 -07:00
Janusz Sobczak f4d85f9b90 Migrate to AnyInvocable in platform code
PiperOrigin-RevId: 504104740
2023-01-23 16:04:21 -08:00
Janusz Sobczak 4fc1583b94 Migrate to absl::AnyInvocable
PiperOrigin-RevId: 501392167
2023-01-11 15:19:33 -08:00
Suet-Fei Li 084f7ebd88 Remove location namespace in third_party/nearby.
PiperOrigin-RevId: 500023196
2023-01-06 02:53:57 -08:00
hais f5fcd35ced nearby sdk refactor
PiperOrigin-RevId: 425434260
2022-02-02 11:56:39 -08:00