• 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
Re: Background app, NSStatusItem, tight loop, event handling
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Background app, NSStatusItem, tight loop, event handling


  • Subject: Re: Background app, NSStatusItem, tight loop, event handling
  • From: Dave Hersey <email@hidden>
  • Date: Thu, 05 Feb 2004 14:22:47 -0500

Hi Dave,

I'm willing to multi-thread the code if need be, but I don't understand why
that would work if giving the run loop as much as 10 seconds to process
events isn't enough for it to process a mouse down in its status menu.

I'm sure I'm going to run into some locking issues if I use threads, and I
don't want to pursue that unless it's clear that using threads will fix the
problem.

So, why will spawning threads get my events processed, when giving excessive
time to the run loop won't?

Thanks,

- d

> The correct solution would be to move your tight loops into a separate
> thread, which would leave the main thread available for event
> processing. I would suggest reading the documentation for NSThread and
> friends.
>
> Dave
_______________________________________________
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: Background app, NSStatusItem, tight loop, event handling
      • From: Dave Camp <email@hidden>
References: 
 >Re: Background app, NSStatusItem, tight loop, event handling (From: Dave Camp <email@hidden>)

  • Prev by Date: Panther took out HFS/HFS+ multiple-session DVD support???
  • Next by Date: Re: Unwanted retain
  • Previous by thread: Re: Background app, NSStatusItem, tight loop, event handling
  • Next by thread: Re: Background app, NSStatusItem, tight loop, event handling
  • Index(es):
    • Date
    • Thread