Skip to content

Commit

Permalink
Fix repeatable threads not working with on thread start feature (#667)
Browse files Browse the repository at this point in the history
fixes: #666
  • Loading branch information
ofriedma authored Sep 7, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent 4209cf5 commit 9f60375
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 2 additions & 0 deletions HISTORY.md
Original file line number Diff line number Diff line change
@@ -2,6 +2,8 @@

## Unreleased

Fix RepeatableThread to work properly with on thread start callback feature (https://github.com/speedb-io/speedb/pull/667).

### New Features

### Enhancements
3 changes: 1 addition & 2 deletions util/repeatable_thread.h
Original file line number Diff line number Diff line change
@@ -103,9 +103,8 @@ class RepeatableThread {
#if defined(_GNU_SOURCE) && defined(__GLIBC_PREREQ)
#if __GLIBC_PREREQ(2, 12)
// Set thread name.
auto thread_handle = thread_.native_handle();
int ret __attribute__((__unused__)) =
pthread_setname_np(thread_handle, thread_name_.c_str());
pthread_setname_np(pthread_self(), thread_name_.c_str());
assert(ret == 0);
#endif
#endif

0 comments on commit 9f60375

Please sign in to comment.