Skip to content

Commit

Permalink
no backoff for win32
Browse files Browse the repository at this point in the history
  • Loading branch information
nmisch committed Mar 2, 2024
1 parent 0e477b1 commit b7a00ba
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions lib/IPC/Run.pm
Original file line number Diff line number Diff line change
Expand Up @@ -3073,8 +3073,10 @@ sub _select_loop {
## lingering, so we need to poll them with a short timeout.
## Otherwise, assume more input will be coming.
$timeout = $not_forever;
$not_forever *= 2;
$not_forever = 0.5 if $not_forever >= 0.5;
unless (Win32_MODE) {
$not_forever *= 2;
$not_forever = 0.5 if $not_forever >= 0.5;
}
}

## Make sure we don't block forever in select() because inputs are
Expand All @@ -3091,8 +3093,10 @@ sub _select_loop {

## Otherwise, assume more input will be coming.
$timeout = $not_forever;
$not_forever *= 2;
$not_forever = 0.5 if $not_forever >= 0.5;
unless (Win32_MODE) {
$not_forever *= 2;
$not_forever = 0.5 if $not_forever >= 0.5;
}
}

_debug 'timeout=', defined $timeout ? $timeout : 'forever'
Expand Down

0 comments on commit b7a00ba

Please sign in to comment.