Merge pull request #445 from yifan-gu/buffered_chan

Changed the keepChannel to buffered channel.
This commit is contained in:
Daniel Smith 2014-07-14 15:08:52 -07:00
commit ceebfad64d

View File

@ -44,6 +44,8 @@ import (
"gopkg.in/v1/yaml"
)
const defaultChanSize = 1024
// DockerContainerData is the structured representation of the JSON object returned by Docker inspect
type DockerContainerData struct {
state struct {
@ -758,7 +760,7 @@ func (kl *Kubelet) SyncManifests(config []api.ContainerManifest) error {
glog.Infof("Desired: %+v", config)
var err error
dockerIdsToKeep := map[DockerID]empty{}
keepChannel := make(chan DockerID)
keepChannel := make(chan DockerID, defaultChanSize)
waitGroup := sync.WaitGroup{}
// Check for any containers that need starting