[Date Prev][Date Next][Thread Prev][Thread Next] [Search] [Date Index] [Thread Index]

[MacPerl] Ensuring consent for multitasking



I have a script (based on File::Find) that rummages through a few
thousand directories, examining many thousands of files.  It prints
out one line per directory during an acquisition phase, then prints
a summary report file in the second (and final) phase.

The script works just fine, but it is unwilling to let any other app
come to the foreground while it is running.  Is there something I
should do to ensure that other applications can come in?  (Just doing
I/O isn't enough; its already doing quite a bit of that...)

One possibility is calling sleep every 10 directories or so, but
this seems pretty hokey and would slow the script down quite a bit.
If this were Unix, I could do a nice(); does Mac OS have anything of
that sort?

More generally, all suggestions are welcome!

-r
--
Rich Morin:          rdm@cfcl.com, +1 650-873-7841, http://www.ptf.com/~rdm
Prime Time Freeware: info@ptf.com, +1 408-433-9662, http://www.ptf.com
MacPerl: http://www.macperl.com,       http://www.ptf.com/ptf/products/MPPE
MkLinux: http://www.mklinux.apple.com, http://www.ptf.com/ptf/products/MKLP

===== Want to unsubscribe from this list?
===== Send mail with body "unsubscribe" to macperl-request@macperl.org