Re: Delay hogs memory
Re: Delay hogs memory
- Subject: Re: Delay hogs memory
- From: Paul Berkowitz <email@hidden>
- Date: Thu, 27 Feb 2003 08:57:20 -0800
On 2/27/03 3:15 AM, "Mr Tea" <email@hidden> wrote:
>
PERSONAL STUPIDITY NOTE: For an embarrassingly long time, I laboured under
>
the misapprehension that an idle handler was something that waited for the
>
system to be idle before running. That sounded sensible, and seemed to be
>
what was implied by the syntax 'on idle, do stuff...'. I thought that this
>
was a way to have things like backups run when nothing else was going on. Of
>
course, when I started trying to use idle handlers in my own scripts, I came
>
to realise how idiotic and delusional this notion was.
I'd hardly say that. You're certainly encouraged to think along those lines
by its name 'on idle'. As I opined just a few days ago in another thread, it
should probably be called 'on not idle', since all the code therein is run
when it's _not_ idling. (To make it even clearer the 'return 5' statement at
the end actually means 'idle 5', but I guess 'return 5' is not misleading.)
>
>
If I was asked to explain the idle thing now, I suppose I might use the
>
analogy of a bicycle on a flat road. Instead of pushing the pedals all the
>
time, a script containing an idle handler only pumps them when the code in
>
the handler is running - the rest of the time it sticks its legs out to the
>
sides and simply freewheels along, using minimal effort and resources. (Just
>
don't ask how gravity and friction fit into this analogy.)
Actually it doesn't do anything at all the rest of the time. It just sits
there counting the seconds.
--
Paul Berkowitz
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.