Commit f196351c authored by Derek Murray's avatar Derek Murray Committed by TensorFlower Gardener
Browse files

Allow non-isolated worker sessions to borrow `WorkerEnv::device_mgr`.

Without this change, a shared resource (e.g. an Iterator) could not be
created in one session `s1`, and used in a later session `s2` after
`s1` was closed, because the iterator might indirectly capture devices
from the previous session, and use them after they are freed when the
`WorkerSession` was deleted.

The current change only affects the singleton "legacy" WorkerSession,
which is never deleted, but this is necessary to switch all sessions
to use separate WorkerSession objects.

PiperOrigin-RevId: 193541426
parent 6a7779f3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment