-
Notifications
You must be signed in to change notification settings - Fork 72
Open
Labels
enhancementNew feature or requestNew feature or request
Description
I've started working on an API that looks like this:
let cgroup: Cgroup = CgroupBuilder::new("hello", V1)
.memory()
.kernel_memory_limit(1024 * 1024)
.memory_hard_limit(1024 * 1024)
.done()
.cpu()
.shares(100)
.done()
.build();Thoughts?
In particular, I'd prefer to leave out an API that adds a pid to the control group. That's racy and it might introduce subtle race conditions into applications depending on this crate. Instead, the API will likely include an include_command() build that starts the Command in the control group. This would be done via a trait ideally, so people can extend it.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request