Re: [RESOLVED] process events in tight loop?
Re: [RESOLVED] process events in tight loop?
- Subject: Re: [RESOLVED] process events in tight loop?
- From: Dave Camp <email@hidden>
- Date: Thu, 14 Jul 2005 11:26:39 -0700
On Jul 14, 2005, at 12:28 AM, Chase wrote:
When using a threaded based solution, you should really put some
effort into insuring that the worker thread(s) do not spin. Ever.
You're preaching to the choir, Bill. I am probably to most event-
driven/anti-polling person there ever was, and I truly tried every
other means I could think of to stay aware of mouse position in a
background-only app, but this appears to be the only way to get the
job done.
If anyone knows how to receive mouseMoved events in a background-
only app, I'd love to hear about it. But I don't think such is
possible since, in most cases, it defies the very nature of a
background-only app to receive mouse moved events. I do, however,
need, in this particular and rare instance, to keep track of the
whereabouts of the mouse **only** while that little window is open
for a few seconds.
Until then, this solution meets my needs and at a minimum of cpu
overhead (given the fact that I'm polling of course).
You might be able to use the HID manager or possibly some Quartz/CG
APIs to get this kind of functionality.
Dave
---
There's an old proverb that says just about whatever you want it to.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden