1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #39794 from tao12345666333/cleanup-set-dead-func

cleanup: remove SetDead function
This commit is contained in:
Brian Goff 2019-09-12 15:36:08 -07:00 committed by GitHub
commit ad718029b7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 8 deletions

View file

@ -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()

View file

@ -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.