@@ -156,7 +156,7 @@ func wait(waitChan <-chan struct{}, timeout time.Duration) error {
156156
157157// WaitStop waits until state is stopped. If state already stopped it returns
158158// immediately. If you want wait forever you must supply negative timeout.
159- // Returns exit code, that was passed to SetStoppedLocking
159+ // Returns exit code, that was passed to SetStopped
160160func (s * State ) WaitStop (timeout time.Duration ) (int , error ) {
161161 s .Lock ()
162162 if ! s .Running {
@@ -243,13 +243,6 @@ func (s *State) SetRunning(pid int, initial bool) {
243243 }
244244}
245245
246- // SetStoppedLocking locks the container state and sets it to "stopped".
247- func (s * State ) SetStoppedLocking (exitStatus * ExitStatus ) {
248- s .Lock ()
249- s .SetStopped (exitStatus )
250- s .Unlock ()
251- }
252-
253246// SetStopped sets the container state to "stopped" without locking.
254247func (s * State ) SetStopped (exitStatus * ExitStatus ) {
255248 s .Running = false
@@ -262,15 +255,7 @@ func (s *State) SetStopped(exitStatus *ExitStatus) {
262255 s .waitChan = make (chan struct {})
263256}
264257
265- // SetRestartingLocking is when docker handles the auto restart of containers when they are
266- // in the middle of a stop and being restarted again
267- func (s * State ) SetRestartingLocking (exitStatus * ExitStatus ) {
268- s .Lock ()
269- s .SetRestarting (exitStatus )
270- s .Unlock ()
271- }
272-
273- // SetRestarting sets the container state to "restarting".
258+ // SetRestarting sets the container state to "restarting" without locking.
274259// It also sets the container PID to 0.
275260func (s * State ) SetRestarting (exitStatus * ExitStatus ) {
276261 // we should consider the container running when it is restarting because of
0 commit comments