Syntactic Confectionery Delight | |
PerlMonks |
Re^2: Splitting one large timeout into few smaller ones..by Eyck (Priest) |
on Apr 07, 2005 at 14:56 UTC ( [id://445719]=note: print w/replies, xml ) | Need Help?? |
Tasks cannot be reordered.
Lets look at something like this
Or, better yet, think of pop3 client,
Imagine what happens when you implement it like this:
getting back to my original problem, you can easily put timeout protection inside getuidl and getmail, but what you created is either instant DOS against your provider, and yourself (try that code with 1000s of mails to download..). Not to mention that now you have to devise a clever way for generating for example unique filename for every mail you're downloading and few similar headaches. Of course if you're trying to write reasonable code, and use just one connection for downloading those mails, you need to devise a clever scheme of locking and passing socket fd around to your children etc...
In Section
Seekers of Perl Wisdom
|
|