diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 3fd8a78ba..f68265562 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,10 @@ +2006-04-23 Corinna Vinschen + Christopher Faylor + + * select.cc (thread_pipe): Raise sleep time dynamically to speed up + select on pipes when copying lots of data. + (thread_mailslot): Ditto for mailslots. + 2006-04-22 Christopher Faylor * signal.cc (abort): On second thought, just set incyg once. diff --git a/winsup/cygwin/select.cc b/winsup/cygwin/select.cc index 073e8bcad..970e529f6 100644 --- a/winsup/cygwin/select.cc +++ b/winsup/cygwin/select.cc @@ -622,6 +622,7 @@ thread_pipe (void *arg) { pipeinf *pi = (pipeinf *) arg; bool gotone = false; + DWORD sleep_time = 0; for (;;) { @@ -645,7 +646,9 @@ thread_pipe (void *arg) } if (gotone) break; - Sleep (10); + Sleep (sleep_time >> 1); + if (sleep_time < 20) + ++sleep_time; } out: return 0; @@ -1634,6 +1637,7 @@ thread_mailslot (void *arg) { mailslotinf *mi = (mailslotinf *) arg; bool gotone = false; + DWORD sleep_time = 0; for (;;) { @@ -1657,7 +1661,9 @@ thread_mailslot (void *arg) } if (gotone) break; - Sleep (10); + Sleep (sleep_time >> 1); + if (sleep_time < 20) + ++sleep_time; } out: return 0;