]> git.kaiwu.me - nginx.git/commitdiff
use SwitchToThread() instead of Sleep(0), because the later
authorIgor Sysoev <igor@sysoev.ru>
Thu, 20 Jan 2011 13:06:21 +0000 (13:06 +0000)
committerIgor Sysoev <igor@sysoev.ru>
Thu, 20 Jan 2011 13:06:21 +0000 (13:06 +0000)
may not yield control, if there is no thread with higher priority

src/os/win32/ngx_process.h

index 55f5648ee7a21f84ecf1694a1ff6729e4547b6b8..235b2502f22fb79ac8a192c38fac18b1e7a39149 100644 (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)