• 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: Alternative to Delay()
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Alternative to Delay()


  • Subject: Re: Alternative to Delay()
  • From: Pete Gontier <email@hidden>
  • Date: Tue, 29 Jul 2003 14:51:13 -0700

On Tuesday, Jul 29, 2003, at 12:53 US/Pacific, Brian Willoughby wrote:

...despite the official documented recommendation, a loop calling
TrackMouseLocation is still not the nicest coding technique in terms of
multi-processing and user interaction. Such a loop simplifies the programmers job, but does not always use the CPU efficiently. As a rule, any time the code is looping while polling for a change in state, this code is wasting some amount of CPU.

I'd put good money down that a TrackMouseLocation loop is actually more efficient, in terms of CPU usage, than a state machine driven by an application framework's full-bore event dispatcher. App frameworks block waiting for events. A more limited and thus simpler code path into and out of blockage is almost certain to be more efficient. Frameworks contain instructions, too.

Of course, in some situations, running the framework dispatcher will be better for the user, but that does not seem to be the issue here. I take "for those cases where I want to keep things simple" to mean "I've already determined that the user doesn't need to touch any other part of my app."

--

Pete Gontier
http://www.m-audio.com/
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: Alternative to Delay() (From: Brian Willoughby <email@hidden>)

  • Prev by Date: Re: Alternative to Delay()
  • Next by Date: Re: Parameter scope quandry
  • Previous by thread: Re: Alternative to Delay()
  • Next by thread: Easy AudioFile Question
  • Index(es):
    • Date
    • Thread