Skip to content

Commit

Permalink
Resolve a race condition that caused the last line of rapid input to …
Browse files Browse the repository at this point in the history
…be delayed. Resolves rt.cpan.org ticket #63242.
  • Loading branch information
David Webb authored and rcaputo committed Jan 27, 2011
1 parent e766708 commit 48d3662
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/POE/Wheel/FollowTail.pm
Expand Up @@ -352,9 +352,13 @@ sub _generate_filehandle_timer {
if (defined(my $raw_input = $driver->get($$handle))) {
TRACE_POLL and warn "<poll> " . time . " raw input";
$filter->get_one_start($raw_input);
foreach my $cooked_input (@{$filter->get_one()}) {
TRACE_POLL and warn "<poll> " . time . " cooked input";
$k->call($ses, $$event_input, $cooked_input, $unique_id);
while (1) {
my $next_rec = $filter->get_one();
last unless @$next_rec;
foreach my $cooked_input (@$next_rec) {
TRACE_POLL and warn "<poll> " . time . " cooked input";
$k->call($ses, $$event_input, $cooked_input, $unique_id);
}
}

# Clear the filehandle's EOF status, if any.
Expand Down

0 comments on commit 48d3662

Please sign in to comment.