Skip to content

Commit 6c7aabb

Browse files
committed
remove std::thread, use join
1 parent df5d71c commit 6c7aabb

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

tests/tests.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ int main(int argc, char *argv[]) {
122122
Derived::operator delete(d, ptr);
123123
}
124124

125-
#if THREAD_SUPPORT
125+
#if THREAD_SUPPORT && __linux__
126126
for(size_t i = 0; i < 4; i++) {
127127
std::array<std::thread, 4> t;
128128
for(size_t z = 0; z < 4; z++) {

tests/thread_tests.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,9 @@ void run_test_threads(void) {
9797
pthread_create(&t, NULL, allocate, (void *) &ALLOC);
9898
pthread_create(&tt, NULL, allocate, (void *) &REALLOC);
9999
pthread_create(&ttt, NULL, allocate, (void *) &CALLOC);
100+
pthread_join(t, NULL);
101+
pthread_join(tt, NULL);
102+
pthread_join(ttt, NULL);
100103
#endif
101104
}
102105

0 commit comments

Comments
 (0)