@@ -156,7 +156,7 @@ func wait(waitChan <-chan struct{}, timeout time.Duration) error {
156
156
157
157
// WaitStop waits until state is stopped. If state already stopped it returns
158
158
// 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
160
160
func (s * State ) WaitStop (timeout time.Duration ) (int , error ) {
161
161
s .Lock ()
162
162
if ! s .Running {
@@ -243,13 +243,6 @@ func (s *State) SetRunning(pid int, initial bool) {
243
243
}
244
244
}
245
245
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
-
253
246
// SetStopped sets the container state to "stopped" without locking.
254
247
func (s * State ) SetStopped (exitStatus * ExitStatus ) {
255
248
s .Running = false
@@ -262,15 +255,7 @@ func (s *State) SetStopped(exitStatus *ExitStatus) {
262
255
s .waitChan = make (chan struct {})
263
256
}
264
257
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.
274
259
// It also sets the container PID to 0.
275
260
func (s * State ) SetRestarting (exitStatus * ExitStatus ) {
276
261
// we should consider the container running when it is restarting because of
0 commit comments