Mercurial > hg > nginx
comparison src/os/win32/ngx_process.h @ 3852:3f04918aefe5
use SwitchToThread() instead of Sleep(0), because the later
may not yield control, if there is no thread with higher priority
author | Igor Sysoev <igor@sysoev.ru> |
---|---|
date | Thu, 20 Jan 2011 13:06:21 +0000 |
parents | f94e8ff65aa2 |
children | d620f497c50f |
comparison
equal
deleted
inserted
replaced
3851:033015e01eec | 3852:3f04918aefe5 |
---|---|
50 | 50 |
51 ngx_pid_t ngx_spawn_process(ngx_cycle_t *cycle, char *name, ngx_int_t respawn); | 51 ngx_pid_t ngx_spawn_process(ngx_cycle_t *cycle, char *name, ngx_int_t respawn); |
52 ngx_pid_t ngx_execute(ngx_cycle_t *cycle, ngx_exec_ctx_t *ctx); | 52 ngx_pid_t ngx_execute(ngx_cycle_t *cycle, ngx_exec_ctx_t *ctx); |
53 | 53 |
54 #define ngx_debug_point() | 54 #define ngx_debug_point() |
55 #define ngx_sched_yield() Sleep(0) | 55 #define ngx_sched_yield() SwitchToThread() |
56 | 56 |
57 | 57 |
58 #define NGX_MAX_PROCESSES (MAXIMUM_WAIT_OBJECTS - 4) | 58 #define NGX_MAX_PROCESSES (MAXIMUM_WAIT_OBJECTS - 4) |
59 | 59 |
60 #define NGX_PROCESS_RESPAWN -2 | 60 #define NGX_PROCESS_RESPAWN -2 |