This is an automated email from the ASF dual-hosted git repository.
bmahler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git
The following commit(s) were added to refs/heads/master by this push:
new b68133747 [cgroups2] Removed templatized write() method.
b68133747 is described below
commit b68133747ef590f72cb9a9607e99df708b8d07f8
Author: Devin Leamy <[email protected]>
AuthorDate: Fri Mar 29 22:07:53 2024 +0000
[cgroups2] Removed templatized write() method.
`cgroups2::write` does not need to be a template function (unlike
`cgroups2::read`) because standard C++ overloading is sufficient to
handle writing multiple different types, without definition conflicts.
Hence, we make `cgroups2::write` not a template function.
---
src/linux/cgroups2.cpp | 8 --------
1 file changed, 8 deletions(-)
diff --git a/src/linux/cgroups2.cpp b/src/linux/cgroups2.cpp
index 816251d84..1c4063be8 100644
--- a/src/linux/cgroups2.cpp
+++ b/src/linux/cgroups2.cpp
@@ -51,12 +51,6 @@ const string MOUNT_POINT = "/sys/fs/cgroup";
template <typename T>
Try<T> read(const string& cgroup, const string& control);
-template <typename T>
-Try<Nothing> write(
- const string& cgroup,
- const string& control,
- const T& value);
-
template <>
Try<string> read(const string& cgroup, const string& control)
@@ -77,7 +71,6 @@ Try<uint64_t> read(const string& cgroup, const string&
control)
}
-template <>
Try<Nothing> write(
const string& cgroup,
const string& control,
@@ -87,7 +80,6 @@ Try<Nothing> write(
}
-template <>
Try<Nothing> write(
const string& cgroup,
const string& control,