use SwitchToThread() instead of Sleep(0), because the later

may not yield control, if there is no thread with higher priority
This commit is contained in:
Igor Sysoev 2011-01-20 13:06:21 +00:00
parent 3d86ad3f95
commit cc878dc6ac

View File

@ -52,7 +52,7 @@ ngx_pid_t ngx_spawn_process(ngx_cycle_t *cycle, char *name, ngx_int_t respawn);
ngx_pid_t ngx_execute(ngx_cycle_t *cycle, ngx_exec_ctx_t *ctx);
#define ngx_debug_point()
#define ngx_sched_yield() Sleep(0)
#define ngx_sched_yield() SwitchToThread()
#define NGX_MAX_PROCESSES (MAXIMUM_WAIT_OBJECTS - 4)