comparison src/core/ngx_file.h @ 6441:9fd738b85fad

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.
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 18 Mar 2016 06:43:52 +0300
parents 1fdba317ee6d
children 6e10518f95d8
comparison
equal deleted inserted replaced
6440:248aa2757332 6441:9fd738b85fad
25 25
26 #if (NGX_THREADS) 26 #if (NGX_THREADS)
27 ngx_int_t (*thread_handler)(ngx_thread_task_t *task, 27 ngx_int_t (*thread_handler)(ngx_thread_task_t *task,
28 ngx_file_t *file); 28 ngx_file_t *file);
29 void *thread_ctx; 29 void *thread_ctx;
30 ngx_thread_task_t *thread_task;
30 #endif 31 #endif
31 32
32 #if (NGX_HAVE_FILE_AIO) 33 #if (NGX_HAVE_FILE_AIO)
33 ngx_event_aio_t *aio; 34 ngx_event_aio_t *aio;
34 #endif 35 #endif