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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T09:39:56+00:00 2026-06-02T09:39:56+00:00

At first glance it seemed like an easy question, but I just can’t figure

  • 0

At first glance it seemed like an easy question, but I just can’t figure how to run an anonymous block on a certain background thread i.e. I am looking for the blocks equivalent of -performSelector:onThread:withObject:waitUntilDone:.

Related: Is it possible to associate a dispatch queue with a certain background thread, just like the main queue is associated with the application’s main thread?

Edit Clarified that I am looking to run an anonymous block

  • 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-02T09:40:03+00:00Added an answer on June 2, 2026 at 9:40 am

    I saw this function RunOnThread() recently in Mike Ash’s PLBlocksPlayground (zip file, see BlocksAdditions.m):

    void RunOnThread(NSThread *thread, BOOL wait, BasicBlock block)
    {
        [[[block copy] autorelease] performSelector: @selector(my_callBlock) onThread: thread withObject: nil waitUntilDone: wait];
    }
    

    This is what I was looking for.

    There are a bunch of other very useful blocks related utilities in PLBlocksPlayground, most of which Mr. Ash explains in this post.

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

Sidebar

Related Questions

This probably sounds like a terrible idea at first glance, but here is my
At first glance this seems like a purely subjective/aesthetic issue, but I'd be interested
This might at first glance seem rather similar to this question , but in
This question seems simple at first glance, but has slowed down my work! Please,
At first glance, this question may seem like a duplicate of How to detect
(At first glance this may look like a duplicate of Different execution plan when
I know at first glance (due to the title) this looks like one of
This is a v.basic question for WPF. At first glance, it seems that WPF
I have just installed C# for the first time, and at first glance it
I just found this: http://www.emadar.com/fpc/lockfree.htm at first glance it looks fine. Is anybody using

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.