MCPcopy Create free account
hub / github.com/containerd/cgroups / freeze

Method freeze

cgroup2/manager.go:755–770  ·  view source on GitHub ↗
(path string, state State)

Source from the content-addressed store, hash-verified

753}
754
755func (c *Manager) freeze(path string, state State) error {
756 values := state.Values()
757 for {
758 if err := writeValues(path, values); err != nil {
759 return err
760 }
761 current, err := fetchState(path)
762 if err != nil {
763 return err
764 }
765 if current == state {
766 return nil
767 }
768 time.Sleep(1 * time.Millisecond)
769 }
770}
771
772func (c *Manager) isCgroupEmpty() bool {
773 // In case of any error we return true so that we exit and don't leak resources

Callers 2

FreezeMethod · 0.95
ThawMethod · 0.95

Calls 3

writeValuesFunction · 0.85
fetchStateFunction · 0.85
ValuesMethod · 0.45

Tested by

no test coverage detected