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 9154603
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T12:27:14+00:00 2026-06-17T12:27:14+00:00

The queue is an argument from the caller. I want to know the type

  • 0

The queue is an argument from the caller. I want to know the type (serial or concurrent) of the input dispatch_queue_t because I’ll handle it differently.

Is it possible? and how to check it?

  • 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-17T12:27:15+00:00Added an answer on June 17, 2026 at 12:27 pm

    If all you have is a dispatch_queue_t that was passed to you by “someone else”, there is no way for you to know. That information is effectively hidden from you. If you are creating the queues yourself, then you could use dispatch_queue_set_specific and
    dispatch_queue_get_specific to stash a value in the queue’s context data, and then read that back out, but if you’re not creating the queue, you’re outta luck.

    FWIW, this sort of hints at a brittle design/anti-pattern. Taking a queue as a parameter implies that you would schedule blocks for future execution on that queue. From that perspective it shouldn’t matter whether the queue is concurrent or serial.

    More to the point, your code should be written such that it doesn’t matter if it’s executed on a serial or concurrent queue. If it uses shared resources, then it should synchronize access to those resources such that if it were to be executed on a concurrent queue, access to those resources would be safe. Conversely, avoid situations in which running on a serial queue would be a problem (i.e. don’t try to achieve recursive locks by using dispatch_sync with a queue that might be serial.)

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

Sidebar

Related Questions

I have queue from struct type struct test { int numbers; }; queue<test> q;
How to clean jms queue from spring jms? Like clean command from MQ Explorer?
I want to queue dependant tasks across several flows that need to be processed
Edit: The reason queue is 2d is because I need a pointer of Command
In short, I get following error: QObject::connect: Cannot queue arguments of type 'cv::Mat' (Make
I want to scan a queue every 10 seconds using a Timer. If there
I want to emulate a network-type stream on a single PC. I've done this
I need a queue on n items where insertion of ( n +1) th
Consider a queue holding a lot of jobs that need processing. Limitation of queue
I've got a queue (actually 3 different queues but I don't believe that will

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.