• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
[Q] NSThreads and UI
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Q] NSThreads and UI


  • Subject: [Q] NSThreads and UI
  • From: Mark de Jong <email@hidden>
  • Date: Thu, 19 Sep 2002 21:18:16 -0700

Hi!

I've got a task that gets time-consuming and I'd like to do it in its own thread.

The main issue I'm having is that even though a method is running in its own thread, the UI is really bogged down and doesn't function at all.

I came across the "Threadworker" helper written by Robert Harder which was supposed to make this better. In it, he starts the thread and then, from within the thread, he uses NSTimer to launch the actual routine that's supposed to run in the thread.

Unfortunately, the code does not explain why he does this. Is there an explanation somewhere that describes why this is done?

I tried mimicking this behavior in my own thread code and the UI is still basically stopped until the thread finishes.

I thought the threads were preemptive and that all the threads were given equal time to process. I'm obviously missing something here.

Thanks,

-- Mark
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: [Q] NSThreads and UI
      • From: Shawn Erickson <email@hidden>
    • Re: [Q] NSThreads and UI
      • From: Cameron Hayne <email@hidden>
  • Prev by Date: Re: [Q] gprof
  • Next by Date: Detecting option key with button click
  • Previous by thread: Re: runModalForWindow allows window switching
  • Next by thread: Re: [Q] NSThreads and UI
  • Index(es):
    • Date
    • Thread