| « Evitando o alerta do gmail ao postar uma mensagem sem corpo | SquirrelFish Extreme (ou a engine de JavaScript mais rápida de todos os tempos da última semana) » |
Comentários no código 2 - Apache
E a bola da vez é o Apache. Quer ganhar pizza e cerveja grátis? Sirva dois bilhões de requisições ou tente (e consiga!) executar o apache com mpm-worker em uma máquina de 16 bits:
/* requests_this_child has gone to zero or below. See if the admin coded
"MaxRequestsPerChild 0", and keep going in that case. Doing it this way
simplifies the hot path in worker_thread */
static void check_infinite_requests(void)
{
if (ap_max_requests_per_child) {
signal_threads(ST_GRACEFUL);
}
else {
/* wow! if you're executing this code, you may have set a record.
* either this child process has served over 2 billion requests, or
* you're running a threaded 2.0 on a 16 bit machine.
*
* I'll buy pizza and beers at Apachecon for the first person to do
* the former without cheating (dorking with INT_MAX, or running with
* uncommitted performance patches, for example).
*
* for the latter case, you probably deserve a beer too. Greg Ames
*/
requests_this_child = INT_MAX; /* keep going */
}
}
Endereço de trackback para este post
Trackback URL (clique direito e copie atalho/localização do link)
3 comentários
Só tem loco programando!
O GeSpeak mesmo deve ter uns 3 minicontos.


