ã²ãã³ãã«nginxãªã©ããã£ã¦ããã nginxãnon-blockingã§åãã¦ããã®ã§ãçµã¿è¾¼ã¿ã®Perlã§ãblockingããå¦çãããããã¨ã¯ããããããã¦ããªãã®ã§ãããsleepã ãã¯æ©è½ãç¨æããã¦ãã¾ããã使ãéãããããããªããã©ãã¨ããããã¬ã¹ãã³ã¹ãé 延ãããã®ã ããã£ã¦ã¿ãã ã¾ããhandlerã¨ãªãperlã¢ã¸ã¥ã¼ã« package delay; use nginx; sub handler { my $r = shift; my $args = $r->args; $args =~ m/sleep=([^&]+)/; my $sleep = $1 || 1; $r->variable("sleep", $sleep); if ( $sleep ne "no" ) { $r->sleep($sleep * 1000, \&next); return; } $
{{#tags}}- {{label}}
{{/tags}}