BIND 10 trac2202, updated. 936498565a5249df01ad44a808bb447952240c90 [2202] Avoid delete in different thread
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Oct 1 13:25:17 UTC 2012
The branch, trac2202 has been updated
via 936498565a5249df01ad44a808bb447952240c90 (commit)
from c74022e2d7acf6b77979e9c8b646d5da95419ed3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 936498565a5249df01ad44a808bb447952240c90
Author: Michal 'vorner' Vaner <michal.vaner at nic.cz>
Date: Mon Oct 1 15:25:02 2012 +0200
[2202] Avoid delete in different thread
-----------------------------------------------------------------------
Summary of changes:
src/lib/util/threads/tests/thread_unittest.cc | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/util/threads/tests/thread_unittest.cc b/src/lib/util/threads/tests/thread_unittest.cc
index 4d477ee..5f95d61 100644
--- a/src/lib/util/threads/tests/thread_unittest.cc
+++ b/src/lib/util/threads/tests/thread_unittest.cc
@@ -37,16 +37,14 @@ using namespace isc::util::thread;
namespace {
void
-doSomething(int* x) {
- delete[] x;
-}
+doSomething(int*) { }
// We just test that we can forget about the thread and nothing
// bad will happen on our side.
TEST(ThreadTest, detached) {
+ int x;
for (size_t i = 0; i < detached_iterations; ++i) {
- int* x = new int[10];
- Thread thread(boost::bind(&doSomething, x));
+ Thread thread(boost::bind(&doSomething, &x));
}
}
More information about the bind10-changes
mailing list