summaryrefslogtreecommitdiff
path: root/dev-cpp/threadpool
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-10-13 22:11:03 +0100
committerV3n3RiX <venerix@redcorelinux.org>2019-10-13 22:11:03 +0100
commit2929788def9a92c1eb237eed93fbdb0c02838bbf (patch)
tree166b01591366d3479084ea774c888bc84aaa8d4f /dev-cpp/threadpool
parentab499d7cfb9ad23e83cf7a4f5052bdf1b4c42030 (diff)
Revert "gentoo resync : 13.10.2019"
This reverts commit ab499d7cfb9ad23e83cf7a4f5052bdf1b4c42030.
Diffstat (limited to 'dev-cpp/threadpool')
-rw-r--r--dev-cpp/threadpool/Manifest5
-rw-r--r--dev-cpp/threadpool/files/threadpool-0.2.5-memleak.patch22
-rw-r--r--dev-cpp/threadpool/metadata.xml11
-rw-r--r--dev-cpp/threadpool/threadpool-0.2.5-r1.ebuild39
4 files changed, 77 insertions, 0 deletions
diff --git a/dev-cpp/threadpool/Manifest b/dev-cpp/threadpool/Manifest
new file mode 100644
index 000000000000..59f315b5abd8
--- /dev/null
+++ b/dev-cpp/threadpool/Manifest
@@ -0,0 +1,5 @@
+AUX threadpool-0.2.5-memleak.patch 786 BLAKE2B 643e3c1d5e71a1802276f8f55aa7e18a167e68caad0d2567df6217b02fca47e91aea48ea446665e6598a93d86380a03d513743154c0a1d5c5204fabde86d4c9c SHA512 427802d2695ed08e3f0fc318e7f379d288bdea9adcdd9ee02215fbffc7a579e736140205cdf9122654c56add637fa80e4673a3a98fba939943f41597d8097912
+DIST threadpool-0_2_5-doc.zip 154617 BLAKE2B 77d9421236d4964c7d69ca59f700f3697dc2c20852737e94bccc0547ce0c5db2a08715701c954c49ceb3c84644c77b7a2e115aef9c537b16df410011af5cc20b SHA512 cdee7d0cf02af55ef4e1237fff9f5214ffb91b00ad2880592efcf3f62d661f3e8a870d092797dd2866e24189e9d6f8e626ca840ab89ce29e5c944c79e8cb31ea
+DIST threadpool-0_2_5-src.zip 58599 BLAKE2B 00312a1eee427cac3f55e1162f3051e7a4a2a805a941f9bf858088deba696dda38f241d7eb5e57d38f00bec161197cbda70be1cd31465c4031d242d2f2e6ab66 SHA512 961576b619e5227098fa37a3c8d903128b3c2a9cf1e55c057c6f9126062bcccfa6fe2510b4e8ee5d1a0e3d0425f0077c50eccad2120a423f69e2705460780e7c
+EBUILD threadpool-0.2.5-r1.ebuild 888 BLAKE2B 152abd29901935ba7b3083759f2b926eb70248cfd5c7f0ee3c4e909f2563fd31d49c09ec6acf4e970dae3ed513c8e90c16ff920948aeb60680a4b3feccf20d32 SHA512 e16f8b7415461cbf47c08e81b008833b3ffc6814627ca3b13e252b536829ad096afb73414d98dfc268508d88cce97e4c44f8f562ba110cbf5f3cdf8dba602967
+MISC metadata.xml 330 BLAKE2B ddf4a8b08f23fb75e5714beced76eef6a2e68c4dadaae513a49611b78472bbf6860ff11a81e8ab51ed8ab5431db97523d4f275c7b3e86b9a274c878fe7274fdd SHA512 5bd797cbdfe2f8a33f10947018d11fc38af0b51a8a1f06b0723d52e3854558c742e62d9f4cb0c13160cbb0ecb9c68267c0d4360b01068e486ca7d4a4314f5229
diff --git a/dev-cpp/threadpool/files/threadpool-0.2.5-memleak.patch b/dev-cpp/threadpool/files/threadpool-0.2.5-memleak.patch
new file mode 100644
index 000000000000..26d89d1d5c25
--- /dev/null
+++ b/dev-cpp/threadpool/files/threadpool-0.2.5-memleak.patch
@@ -0,0 +1,22 @@
+Fix memleak due circular references blocking garbage collection.
+
+http://www.cplusplus.com/forum/general/56971/ provides a testcase for a memory
+leak with the threadpool due to shared_ptr usage.
+
+I really needed threadpool to work for me, so I traced & fixed it as best as
+possible. When the threadpool is being destroyed, your threads should have
+terminated already. Do so deliberately if not done yet, so that they free the
+memory.
+
+Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
+
+--- threadpool/boost/threadpool/detail/pool_core.hpp
++++ threadpool/boost/threadpool/detail/pool_core.hpp
+@@ -150,6 +150,7 @@
+ /// Destructor.
+ ~pool_core()
+ {
++ terminate_all_workers(true);
+ }
+
+ /*! Gets the size controller which manages the number of threads in the pool.
diff --git a/dev-cpp/threadpool/metadata.xml b/dev-cpp/threadpool/metadata.xml
new file mode 100644
index 000000000000..2af619160dd4
--- /dev/null
+++ b/dev-cpp/threadpool/metadata.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <maintainer type="person">
+ <email>robbat2@gentoo.org</email>
+ <name>Robin H. Johnson</name>
+ </maintainer>
+ <upstream>
+ <remote-id type="sourceforge">threadpool</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-cpp/threadpool/threadpool-0.2.5-r1.ebuild b/dev-cpp/threadpool/threadpool-0.2.5-r1.ebuild
new file mode 100644
index 000000000000..882c07045372
--- /dev/null
+++ b/dev-cpp/threadpool/threadpool-0.2.5-r1.ebuild
@@ -0,0 +1,39 @@
+# Copyright 1999-2016 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+DESCRIPTION="A cross-platform C++ thread pool library (built on top of Boost)"
+HOMEPAGE="http://threadpool.sourceforge.net/"
+MY_PV=${PV//./_}
+MY_P=${PN}-${MY_PV}
+SRC_URI_BASE="mirror://sourceforge/threadpool/threadpool/${PV}%20%28Stable%29"
+SRC_URI="${SRC_URI_BASE}/${MY_P}-src.zip
+ doc? ( ${SRC_URI_BASE}/${MY_P}-doc.zip )"
+
+LICENSE="Boost-1.0"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="doc"
+
+DEPEND=""
+RDEPEND="dev-libs/boost"
+
+S="${WORKDIR}/${MY_P}-src/${PN}"
+
+DOCS=( README TODO CHANGE_LOG )
+PATCHES=( "${FILESDIR}/${P}-memleak.patch" )
+
+src_compile() {
+ # Do nothing
+ # The makefile just builds the documentation again
+ # Not even any install targets
+ return
+}
+
+src_install() {
+ doheader -r boost
+
+ use doc && HTML_DOCS+=( "${WORKDIR}"/"${MY_P}"-doc/. )
+ einstalldocs
+}