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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:23:31+00:00 2026-06-10T02:23:31+00:00

I have an NSImageView that needs to redraw a constantly updating image. I have

  • 0

I have an NSImageView that needs to redraw a constantly updating image.
I have a model object that creates the NSImage, and a controller that links this image to the NSImageView.

With multithreading, I can easily have the model object continuously update its output image in a background thread. But as UI interactions are supposed to be done on the main thread, I can’t set the NSImageView’s image on a background thread. If I update the NSImageView on the main thread, the program would become unresponsive

  • 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-10T02:23:33+00:00Added an answer on June 10, 2026 at 2:23 am

    I hate to be contradictory but why do you think that updating the image on the main thread would make the program unresponsive?

    If calculating the next NSImage is instantaneous then logically you should just calculate and display the last one since none of those in between will ever be perceived.

    If calculating the next one costs some time then do the calculation off the main thread then push the image to the view on the main thread (eg, using performSelectorOnMainThread:...). The main thread won’t become unresponsive because it has all that time while you’re calculating the next image to deal with other events.

    If updates are more frequent than the display’s frame rate then you can probably go one better by setting yourself up with a CVDisplayLink and polling whatever is updating the image to get the latest one upon every tick of that.

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

Sidebar

Related Questions

Let's say I have an NSImage that's 100x100. I also have an NSImageView that's
I have an NSImageView which I get an image for from an NSOpenPanel. That
I have a NSTableView that holds a name to all of my NSImageView's, and
have written this little class, which generates a UUID every time an object of
have a problem. At first look at this HTML <div id=map style=background-image: url(map.png); width:
I have an NSWindow containing and NSImageView. I want that the user can drag
I have a transparent .png image that lays over an NSView and it should
This is my image resize code: CALayer *newCALayer = [[CALayer layer] retain]; NSImage* image
I have requirement like this, Have One NSIMageView and which will be changing frequently
I have an NSImageView in a view that utilizes Core Animation. Prior to 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.