Hi!

$ time perl -Mojo -E 'app->ua->get("google.com",sub{}); Mojo::IOLoop->start'

real    0m21.106s
user    0m0.157s
sys     0m0.011s

This 20-second delay happens because inactive_timeout is set to 20, and
thus connection to google.com kept alive after get() finish.

$ time perl -Mojo -E 'app->ua->get("google.com"); Mojo::IOLoop->start'

real    0m0.388s
user    0m0.152s
sys     0m0.010s

But why same doesn't happens with blocking get? Isn't it also should keep
connection to google.com alive after get() finish? At glance look at
source I don't see reason for this behaviour - both blocking and
non-blocking executed internal as non-blocking; and there are separate
keep-alive queues for blocking and non-blocking requests (so keep-alive
for blocking should work too).

-- 
                        WBR, Alex.

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to