file AIO read may be posted inside loop

This commit is contained in:
Igor Sysoev 2010-10-12 12:06:52 +00:00
parent 7087d5d72a
commit 89eae52df8
2 changed files with 7 additions and 6 deletions

View File

@ -74,18 +74,18 @@ ngx_output_chain(ngx_output_chain_ctx_t *ctx, ngx_chain_t *in)
}
}
#if (NGX_HAVE_FILE_AIO)
if (ctx->aio) {
return NGX_AGAIN;
}
#endif
out = NULL;
last_out = &out;
last = NGX_NONE;
for ( ;; ) {
#if (NGX_HAVE_FILE_AIO)
if (ctx->aio) {
return NGX_AGAIN;
}
#endif
while (ctx->in) {
/*

View File

@ -211,6 +211,7 @@ ngx_http_copy_aio_handler(ngx_output_chain_ctx_t *ctx, ngx_file_t *file)
r->main->blocked++;
r->aio = 1;
ctx->aio = 1;
}