1655
s.state = contextStateAcquired
1656
if request.engine != nil {
1657
>
// engineFuture.Set should only be called inside stateLock when state is
context_impl.go
1658
>
// Acquiring, so that other code (i.e. FinishStop) can know that after a state
1659
>
// transition to Stopping/Stopped, engineFuture cannot be Set.
1660
>
if s.engineFuture.Ready() {
1661
// defensive check, this should never happen
1662
s.contextTaggedLogger.Warn("transition to acquired with engine set twice")
1663
return errInvalidTransition
1664
}
1666
}
1667
if !s.engineFuture.Ready() {