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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T06:35:13+00:00 2026-05-27T06:35:13+00:00

dispatch_queue_t callerQueue = dispatch_get_current_queue(); dispatch_retain(callerQueue); dispatch_queue_t downloadQueue = dispatch_queue_create(Download Queue,NULL); dispatch_async(downloadQueue, ^{ //some code

  • 0
dispatch_queue_t callerQueue = dispatch_get_current_queue();
dispatch_retain(callerQueue);
dispatch_queue_t downloadQueue = dispatch_queue_create("Download Queue",NULL);

dispatch_async(downloadQueue, 
^{
    //some code that accesses a web service
    dispatch_async(callerQueue,
    ^{
      //some code that accesses UI
    });
});
dispatch_release(downloadQueue);
NSLog(@"great successing!");

The problem is that “Great successing!” never shows up, and nothing ever happens beyond the end of the code outermost dispatch_async block. I’m not sure what I’m doing wrong but I know there is something seriously wrong with this.

  • 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-05-27T06:35:14+00:00Added an answer on May 27, 2026 at 6:35 am

    You are releasing your download queue too early. You need to wait until after it has executed the block. The dispatch_async man page suggests putting the release at the end of the block.

    It is important to remember to retain the destination queue before the first call to dispatch_async(), and to release that queue at the end of the completion callback to ensure the destination queue is not deallocated while the completion callback is pending.

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

Sidebar

Related Questions

have a view that loads and a serial dispatch queue that is created, loads
edit: in case anyone is wondering, the actionhandler invokes code that creates and disposes
I have a php script that does some processing (creates remittance advice PDFs, self-billing
void dispatch_for(dispatch_queue_t *queue, long number, void (* work)(long)){ int loop = number; int i;
I'm trying to create custom view that draws image downloaded from Url. The code
I have a singleton data manager object that manages the connection to a web
I have a piece of code that sets up a capture session from the
I tried to dispatch a custom event from some component on the stage and
I maintain a dispatch queue as a property with my view controller. I create
I'm capturing images using this code #pragma mark - image capture // Create and

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.