diff options
author | Maxim Dounin <mdounin@mdounin.ru> | 2016-03-18 06:43:52 +0300 |
---|---|---|
committer | Maxim Dounin <mdounin@mdounin.ru> | 2016-03-18 06:43:52 +0300 |
commit | ac78b26324a348ebdd108de0c022729b671549fb (patch) | |
tree | 606691334fa0d164469073bacb4c132c86a2f4d3 /src/core/ngx_file.h | |
parent | 931ce7f02a9c55987ef9a7128882097b89a36540 (diff) | |
download | nginx-ac78b26324a348ebdd108de0c022729b671549fb.tar.gz nginx-ac78b26324a348ebdd108de0c022729b671549fb.zip |
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.
Diffstat (limited to 'src/core/ngx_file.h')
-rw-r--r-- | src/core/ngx_file.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/core/ngx_file.h b/src/core/ngx_file.h index 301b1918b..aeb6c0cb2 100644 --- a/src/core/ngx_file.h +++ b/src/core/ngx_file.h @@ -27,6 +27,7 @@ struct ngx_file_s { ngx_int_t (*thread_handler)(ngx_thread_task_t *task, ngx_file_t *file); void *thread_ctx; + ngx_thread_task_t *thread_task; #endif #if (NGX_HAVE_FILE_AIO) |