blob: 5e35567fc03d8cef42c42b8c1dcbf062dd2a061a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
From c941e4f79748937b117aebc0ee961325b666053d Mon Sep 17 00:00:00 2001
From: Nathan Johnson <nathan@nathanjohnson.org>
Date: Sun, 28 Feb 2016 12:04:45 -0600
Subject: [PATCH] CCBC-683 Remove double calls to pthread_join in ioserver tests.
Call join() from threads-win32 close() to be consistent with pthreads.
Change-Id: I62566a588eb7036205e75945305cf2277db0e00a
---
diff --git a/tests/ioserver/connection.cc b/tests/ioserver/connection.cc
index 23712d8..7e423eb 100644
--- a/tests/ioserver/connection.cc
+++ b/tests/ioserver/connection.cc
@@ -152,7 +152,10 @@
ctlfd_user->close();
ctlfd_lsn->close();
datasock->close();
- thr->join();
+ // We don't want to explicitly call join() here since that
+ // gets called in the destructor. This is unncessary
+ // and broken on musl.
+ // thr->join();
delete thr;
mutex.close();
initcond.close();
diff --git a/tests/ioserver/ioserver.cc b/tests/ioserver/ioserver.cc
index a9bce67..c5f5b14 100644
--- a/tests/ioserver/ioserver.cc
+++ b/tests/ioserver/ioserver.cc
@@ -63,7 +63,10 @@
delete *iter;
}
mutex.unlock();
- thr->join();
+ // We don't want to explicitly call join() here since that
+ // gets called in the destructor. This is unncessary
+ // and broken on musl.
+ // thr->join();
delete thr;
mutex.close();
delete lsn;
diff --git a/tests/ioserver/threads-win32.cc b/tests/ioserver/threads-win32.cc
index 9ed9614..1e5710a 100644
--- a/tests/ioserver/threads-win32.cc
+++ b/tests/ioserver/threads-win32.cc
@@ -36,6 +36,7 @@
Thread::close()
{
if (initialized) {
+ join();
CloseHandle(hThread);
initialized = false;
}
|