Use atomic compare-and-swap to detect if we've been preempted by another thread and therefore can avoid making the expensive write() syscall. Speeds up the heavily contended case by about 1-2% and has little if any impact on the non-contended case. I wasn't able to measure the difference at any rate. |
||
|---|---|---|
| .. | ||
| ares | ||
| unix | ||
| win | ||
| cares.c | ||
| fs-poll.c | ||
| uv-common.c | ||
| uv-common.h | ||