* select.cc (thread_pipe): Raise sleep time dynamically to speed up
select on pipes when copying lots of data. (thread_mailslot): Ditto for mailslots.
This commit is contained in:
parent
3153a0ecae
commit
cfa882572a
|
@ -1,3 +1,10 @@
|
||||||
|
2006-04-23 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
|
* 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 <cgf@timesys.com>
|
2006-04-22 Christopher Faylor <cgf@timesys.com>
|
||||||
|
|
||||||
* signal.cc (abort): On second thought, just set incyg once.
|
* signal.cc (abort): On second thought, just set incyg once.
|
||||||
|
|
|
@ -622,6 +622,7 @@ thread_pipe (void *arg)
|
||||||
{
|
{
|
||||||
pipeinf *pi = (pipeinf *) arg;
|
pipeinf *pi = (pipeinf *) arg;
|
||||||
bool gotone = false;
|
bool gotone = false;
|
||||||
|
DWORD sleep_time = 0;
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
|
@ -645,7 +646,9 @@ thread_pipe (void *arg)
|
||||||
}
|
}
|
||||||
if (gotone)
|
if (gotone)
|
||||||
break;
|
break;
|
||||||
Sleep (10);
|
Sleep (sleep_time >> 1);
|
||||||
|
if (sleep_time < 20)
|
||||||
|
++sleep_time;
|
||||||
}
|
}
|
||||||
out:
|
out:
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -1634,6 +1637,7 @@ thread_mailslot (void *arg)
|
||||||
{
|
{
|
||||||
mailslotinf *mi = (mailslotinf *) arg;
|
mailslotinf *mi = (mailslotinf *) arg;
|
||||||
bool gotone = false;
|
bool gotone = false;
|
||||||
|
DWORD sleep_time = 0;
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
|
@ -1657,7 +1661,9 @@ thread_mailslot (void *arg)
|
||||||
}
|
}
|
||||||
if (gotone)
|
if (gotone)
|
||||||
break;
|
break;
|
||||||
Sleep (10);
|
Sleep (sleep_time >> 1);
|
||||||
|
if (sleep_time < 20)
|
||||||
|
++sleep_time;
|
||||||
}
|
}
|
||||||
out:
|
out:
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue