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

Method AddTask

cgroup1/cgroup.go:195–197  ·  view source on GitHub ↗

AddTask moves the provided tasks (threads) into the new cgroup. Without additional arguments, the task is added to all the cgroup subsystems. When giving AddTask a list of subsystem names, the task is only added to those subsystems, provided that they are active in the targeted cgroup.

(process Process, subsystems ...Name)

Source from the content-addressed store, hash-verified

193// When giving AddTask a list of subsystem names, the task is only added to those
194// subsystems, provided that they are active in the targeted cgroup.
195func (c *cgroup) AddTask(process Process, subsystems ...Name) error {
196 return c.add(process, cgroupTasks, subsystems...)
197}
198
199// writeCgroupProcs writes to the file, but retries on EINVAL.
200func writeCgroupProcs(path string, content []byte, perm fs.FileMode) error {

Callers

nothing calls this directly

Calls 1

addMethod · 0.95

Tested by

no test coverage detected