projects
/
platform
/
upstream
/
curl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b4fae9d
)
sockfilt.c: Reduce CPU load while running under a Windows PIPE
author
Marc Hoersken
<info@marc-hoersken.de>
Sat, 6 Apr 2013 17:05:16 +0000
(19:05 +0200)
committer
Marc Hoersken
<info@marc-hoersken.de>
Sat, 6 Apr 2013 17:05:16 +0000
(19:05 +0200)
tests/server/sockfilt.c
patch
|
blob
|
history
diff --git
a/tests/server/sockfilt.c
b/tests/server/sockfilt.c
index
5c7277d
..
1a1eeb3
100644
(file)
--- a/
tests/server/sockfilt.c
+++ b/
tests/server/sockfilt.c
@@
-643,8
+643,11
@@
static int select_ws(int nfds, fd_set *readfds, fd_set *writefds,
/* check if there is no data from PIPE input */
if(!PeekNamedPipe(handle, NULL, 0, NULL, &avail, NULL))
avail = 0;
- if(!avail)
+ if(!avail)
{
FD_CLR(sock, readfds);
+ /* reduce CPU load */
+ Sleep(10);
+ }
} /* check if there is no data from keyboard input */
else if (!_kbhit()) {
/* check if there are INPUT_RECORDs in the input buffer */