Update 2: As @Valle Lukas pointed out, Looks like this is due to a leak being addressed.
Update 1:
Ok I got around to trying this again and have a much simpler bit of code that demonstrates the issue I'm having:
my $channel=Channel.new; #create a new channel
$channel.send(0); #kickstart the circular pipeline
react {
whenever $channel {
say $_;
$channel.send($_ + 1); #send back to same pipeline
#sit back and watch the memory usage grow
}
}
Basically I create a single stage pipeline via a Channel
, send a single message to it, then setup react
/whenever
blocks to process the message (add 1) and send it back to the same channel again. The pipeline once started never stops.
The growth in memory usage ( I get to about 600MB and climbing in about 10 seconds), isn't due to message buffering, there is only ever one message in the cue.
Is this simply a bug or how can I address the memory usage of a channel?
Seems to be addressed by Jonathan Worthington commit
d5044de
and
25b486d
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With