Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8573301
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T19:13:03+00:00 2026-06-11T19:13:03+00:00

Xcode’s thread list pane shows English-like names for several special threads: com.apple.main-thread, com.apple.libdispatch-manager, com.dispatchfractal.opencl,

  • 0

Xcode’s “thread list” pane shows English-like names for several special threads: com.apple.main-thread, com.apple.libdispatch-manager, com.dispatchfractal.opencl, com.dispatchfractal.opengl, com.apple.root.low-priority,… But for user-created threads that field is just blank.

Is there any way to set that “thread name” field programmatically from my application? For example, if I’ve got a thread devoted to network I/O, I’d like it to show up as “com.example.network-io” in the debugger; if I spawn five worker threads I’d like to be able to name them “worker A”, “worker B”, etc. Does Xcode pull its thread-names from some API that I could hook into myself? Maybe something like CFAssignDebuggerNameToCurrentThread? 🙂

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T19:13:05+00:00Added an answer on June 11, 2026 at 7:13 pm

    Probably not exactly what you want but NSThread has setName: method that allows you to set thread’s name, you can attach meaningful name to the thread so you’ll get the following in debugger:

    [[NSThread mainThread] setName:@"That is main thread!"];
    

    enter image description here

    Remember also that some apis (like grand central dispatch) operate with thread pools so you are not guaranteed on what thread your operation will be performed

    Edit:
    com.apple.main-thread, com.apple.libdispatch-manager etc are labels of corresponding dispatch queues. You can set label value when queue is created with dispatch_queue_create function and later get it from the queue using dispatch_queue_get_label function.

    It seems there’s no API to change label value of the existing dispatch queue and I would not advise to change labels of the system queues anyway.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

xcode 4.2 os x 10.7 when i set my includes to look like: #include
XCode Error: GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Mon Aug 8 20:32:45 UTC 2011)
xCode 4.4.1 OSX 10.8.2, looks like [operation cancelAllOperations]; isn't working - (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
xcode 4.5 OSX 10.8 CoreLibrary(529mb) install error like this. Failed to install documentation for
(XCode 4.3) Why does the following crash at the NSLog statement with EXC_BAD_ACCESS? BOOL
Xcode's dispatch_after template double delayInSeconds = 2.0; double delayInNanoSeconds = delayInSeconds * NSEC_PER_SEC; dispatch_time_t
XCode Attributes Why are the Xcode 4 attributes for setting the frame disabled? I
XCode 3.1.2 using built-in OCTest unit testing. I'm getting a crash when unit tests
Xcode allows you to create automated scripts for performing repetitive tasks. What scripts have
Xcode automatically resizes and applies a glossy look to images added as the application

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.