Skip to content

Commit

Permalink
Fix repeatable threads not working with on thread start feature
Browse files Browse the repository at this point in the history
fixes: #666
  • Loading branch information
ofriedma committed Sep 7, 2023
1 parent 4209cf5 commit 6c5aefc
Show file tree
Hide file tree
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
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions util/repeatable_thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6c5aefc

Please sign in to comment.