[OS X Emacs] Aquamacs calling select() all the time?
Doug McNutt
douglist at macnauchtan.com
Sat Dec 1 18:06:41 EST 2012
At 13:44 -0500 12/1/12, Win Treese wrote:
>I was poking around to figure out some disk activity problems on my Mac (2009 iMac with Mountain Lion), and I noticed that Aquamacs was repeatedly and quickly calling select(). No other IO for it. I was a bit surprised by this, since I would expect it to call select() and wait for something to happen, and I can't figure out what select() might be returning for it when it is quietly sitting iconified in the Dock.
>
>It also happens when Aquamacs is started with -q, so I don't think it's any odd elisp I'm running myself. Running the emacs that ships with Mac OS in the terminal doesn't do the same thing.
>
>To see it, I was running:
>
> sudo fs_usage Aquamacs
>
>It's not a big deal, but I was wondering if anyone has seen it, or knows why it might be doing that.
select (0, 0, 0, time as a float) is a way to perform a sleep with a time interval that is less than 1 second. It releases the machine for other things in a way that a counting loop would not. You don't have to specify anything other than the timeout argument. Just use zeros for the others that would normally be ports and the like.
--
--> Halloween == Oct 31 == Dec 25 == Christmas <--
More information about the MacOSX-Emacs
mailing list