]> git.kaiwu.me - nginx.git/commit
Threads: task pointer stored in ngx_file_t.
authorMaxim Dounin <mdounin@mdounin.ru>
Fri, 18 Mar 2016 03:43:52 +0000 (06:43 +0300)
committerMaxim Dounin <mdounin@mdounin.ru>
Fri, 18 Mar 2016 03:43:52 +0000 (06:43 +0300)
commitac78b26324a348ebdd108de0c022729b671549fb
tree606691334fa0d164469073bacb4c132c86a2f4d3
parent931ce7f02a9c55987ef9a7128882097b89a36540
Threads: task pointer stored in ngx_file_t.

This simplifies the interface of the ngx_thread_read() function.

Additionally, most of the thread operations now explicitly set
file->thread_task, file->thread_handler and file->thread_ctx,
to facilitate use of thread operations in other places.

(Potential problems remain with sendfile in threads though - it uses
file->thread_handler as set in ngx_output_chain(), and it should not
be overwritten to an incompatible one.)

In collaboration with Valentin Bartenev.
src/core/ngx_file.h
src/core/ngx_output_chain.c
src/http/ngx_http_file_cache.c
src/os/unix/ngx_files.c
src/os/unix/ngx_files.h