--- AnyEvent-Fork-Pool/Pool.pm 2013/04/25 00:27:22 1.9 +++ AnyEvent-Fork-Pool/Pool.pm 2013/04/25 01:21:18 1.10 @@ -539,6 +539,18 @@ too high, the worker could ask to get retired, to avoid memory leaks to accumulate. +Example: retire a worker after it has handled roughly 100 requests. + + my $count = 0; + + sub my::worker { + + ++$count == 100 + and AnyEvent::Fork::Pool::retire (); + + ... normal code goes here + } + =back =head1 POOL PARAMETERS RECIPES