Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Sleep - settle an argument?

by FloydATC (Deacon)
on Sep 20, 2012 at 13:09 UTC ( #994659=note: print w/replies, xml ) Need Help??


in reply to Sleep - settle an argument?

IIRC, most browsers of old would not start rendering the document until it had been fully transmitted from the server and the connection closed, so a sleep() in a CGI would just make the connection appear to "hang" while unnecessarily eating up resources on the web server.

From the Perl perspective, the default sleep() can only do integer seconds while Time::HiRes lets you use fractions. Other than that, nothing has changed AFAIK.

-- Time flies when you don't know what you're doing

Replies are listed 'Best First'.
Re^2: Sleep - settle an argument?
by ultranerds (Friar) on Sep 20, 2012 at 13:19 UTC
    >>IIRC, most browsers of old would not start rendering the document until it had been fully transmitted from the server and the connection closed, so a sleep() in a CGI would just make the connection appear to "hang" while unnecessarily eating up resources on the web server. <<<

    Thanks, that was what I was thinking of - although I could swear than when I used it in a browser run script in my very early years, it simply ignored the sleep and run as normal - but my memory isn't as good as it used to be! (not good for a 28 year old to be saying ;))

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://994659]
help
Chatterbox?
[Discipulus]: good morning monks!
[marto]: Corion, I've been better, but things are improving in many cases :) Simply not enough time/rest :)
[Corion]: Hi Discipulus!
[marto]: hopefully you guys are also well :)
[Corion]: marto: Yeah - I'm looking for a week off in a week, even if it'll be a trip to Amsterdam ;)
[Discipulus]: oh thanks, i'm always at well as the ratchet or bucket
[Corion]: But I'm slowly starting to get into programming again - yesterday I translated my talk for YAPC::E (in Amsterdam) to English, and decided to put my Jekyll-clone to rest for the time being
[Corion]: Discipulus++ # being well is like being earnest
[marto]: hopefully next year I'll be in a position to go to Perly things in Europe :)
[Corion]: Maybe I'll use the Real Jekyll a bit to get a feel for how it actually works, and to get annoyed by it ;)

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (7)
As of 2017-07-27 07:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (404 votes). Check out past polls.