On 28 Dec 2000, at 10:50, Peter Pentchev wrote:
> Hmm. On second thoughts, I wonder if the sleep/opendir method might
> not work better under temporarily high load - even better than the
> cron-based one. If a bunch of mails arrive at the same time.. hmm
> I should play around with kevent to see how it could handle this -
> notifying me for each and every message could be suboptimal.
I would appreciate that very much.
> I could play around with kevent in a couple of days to see how it
> behaves when multiple messages arrive. When a file or multiple files
> arrive, the sleeper would have to go through the opendir/readdir
> dance, and either only process the first file it finds, or process them
> all. In the second case, if multiple files should arrive, those would
> be all processed in response to one event, and the next events would
> trigger lots of opendir/readdir/closedir calls with no files found.
I'll include my thoughts in case they help:
What about a daemon signalling a waiting perl script? The script would
wake up, take the first file, process it, repeat until no more files, then go
back to sleep.
Is it an issue if the daemon signals the perl script when it's already
processing? Could a signal be missed?
thank you.
--
Dan Langille
The FreeBSD Diary - http://freebsddiary.org/
FreshPorts - http://freshports.org/
NZ Broadband - http://unixathome.org/broadband/
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message