cleanup: remove SetDead function
Signed-off-by: Jintao Zhang <zhangjintao9020@gmail.com>
This commit is contained in:
parent
cd1356d9ea
commit
f8f6f7c2a0
|
@ -366,13 +366,6 @@ func (s *State) IsRemovalInProgress() bool {
|
||||||
return res
|
return res
|
||||||
}
|
}
|
||||||
|
|
||||||
// SetDead sets the container state to "dead"
|
|
||||||
func (s *State) SetDead() {
|
|
||||||
s.Lock()
|
|
||||||
s.Dead = true
|
|
||||||
s.Unlock()
|
|
||||||
}
|
|
||||||
|
|
||||||
// IsDead returns whether the Dead flag is set. Used by Container to check whether a container is dead.
|
// IsDead returns whether the Dead flag is set. Used by Container to check whether a container is dead.
|
||||||
func (s *State) IsDead() bool {
|
func (s *State) IsDead() bool {
|
||||||
s.Lock()
|
s.Lock()
|
||||||
|
|
|
@ -109,7 +109,9 @@ func TestStateRunStop(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set the state to dead and removed.
|
// Set the state to dead and removed.
|
||||||
s.SetDead()
|
s.Lock()
|
||||||
|
s.Dead = true
|
||||||
|
s.Unlock()
|
||||||
s.SetRemoved()
|
s.SetRemoved()
|
||||||
|
|
||||||
// Wait for removed status or timeout.
|
// Wait for removed status or timeout.
|
||||||
|
|
Loading…
Reference in New Issue