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

  • Home
  • SEARCH
  • 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 1020813
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:12:53+00:00 2026-05-16T11:12:53+00:00

Hey, I have a problem in Multithreading. To describe this, I have two threads.

  • 0

Hey, I have a problem in Multithreading.
To describe this, I have two threads.
On main thread I have some logic
And on another thread, I have a logic and some logic to UI which will update UI.
What I want to do is that I want to call some method after the UI on another thread is updated.
I think I am supposed to use NSOperationQueue or something. or background queue.
but I have read the concurrency programming and threading guide and I still have no idea how to do it.

So how to do it so that I can call a method after a thread is finished?
thanks!

  • 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-16T11:12:53+00:00Added an answer on May 16, 2026 at 11:12 am

    You should never touch the UI from any thread other than the main thread. Two easy ways of sending messsages between threads:

    performSelector:

    [someObject performSelectorOnMainThread:@selector(someSelector) withObject:nil waitUntilDone:NO];
    

    Notifications:

    NSNotification *notification = [NSNotification notificationWithName:@"myNotification" object:nil];
    [[NSNotificationCenter defaultCenter] performSelectorOnMainThread:@selector(postNotification:) withObject:notification waitUntilDone:NO];
    

    You can of course also use an NSOperationQueue and Key-Value-Observe the job’s finished property, but unless you’d need it for other reasons it just adds unnecessary complexity.

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

Sidebar

Related Questions

Hey! Have a problem that is driving me crazy! My Main Window will not
Hey, can I ask you something? I'm using VB6.0 and I have some problem
Hey, I have a big problem with my container-sketch. How can I realize this
Hey, I have a problem sharing a link on twitter: data-url=http://ipofmywebsite/mypage/?some_id=276&some_name=b+a As I put
hey , I have a problem with updating a record using a domain service,
Hey everyone. I have a problem with a datagrid in my window. I want
hey - great coders and haskellers, i'm a haskell freshman and have a problem
Hey there, I have a simple problem but can't seem to get the solution
I have a problem I have been working on for about a week and
hey all, I have made a socket server in C# for a flash game

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.