Skip to content

Support naming bthread to help debug#3158

Merged
chenBright merged 1 commit into
apache:masterfrom
ZhengweiZhu:master
Dec 2, 2025
Merged

Support naming bthread to help debug#3158
chenBright merged 1 commit into
apache:masterfrom
ZhengweiZhu:master

Conversation

@ZhengweiZhu

@ZhengweiZhu ZhengweiZhu commented Nov 20, 2025

Copy link
Copy Markdown
Contributor

The bthread name is shown when checking bthread status by curl ip:port/bthreads/xxx, which helps to debug when bthread trace is not enabled.

What problem does this PR solve?

Issue Number: enhancement for #3088

Problem Summary:

What is changed and the side effects?

Changed:
add name field in bthread_attr_t and set name when creating bthread

Side effects:

  • Performance effects: NO

  • Breaking backward compatibility: NO


Check List:

Comment thread src/bthread/types.h Outdated
Comment thread src/bthread/types.h
Comment thread src/bthread/types.h Outdated
Comment thread src/bthread/task_group.cpp
@ZhengweiZhu ZhengweiZhu force-pushed the master branch 2 times, most recently from 49df2ee to 91bfeb8 Compare November 21, 2025 03:21
The bthread name is shown when checking bthread status by curl
ip:port/bthreads/xxx, which helps to debug when bthread trace is not
enabled.
@ZhengweiZhu

Copy link
Copy Markdown
Contributor Author

ping

@wwbmmm

wwbmmm commented Dec 2, 2025

Copy link
Copy Markdown
Contributor

LGTM

@chenBright chenBright left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chenBright chenBright merged commit 8734f06 into apache:master Dec 2, 2025
17 checks passed
zchuango pushed a commit to zchuango/brpc that referenced this pull request May 9, 2026
The bthread name is shown when checking bthread status by curl
ip:port/bthreads/xxx, which helps to debug when bthread trace is not
enabled.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants