It doesn't buy us much and copying to a new array is slower;
but probably not measurable in real-world use.
-sub rootset { @{$_[0]{rootset}} }
-
sub thread {
my $self = shift;
$self->_setup();
sub thread {
my $self = shift;
$self->_setup();
sub walk_thread {
my ($th, $ctx, $cb) = @_;
sub walk_thread {
my ($th, $ctx, $cb) = @_;
- my @q = map { (0, $_) } $th->rootset;
+ my @q = map { (0, $_) } @{$th->{rootset}};
while (@q) {
my $level = shift @q;
my $node = shift @q or next;
while (@q) {
my $level = shift @q;
my $node = shift @q or next;
my ($th, $ctx) = @_;
my $inbox = $ctx->{-inbox};
my $mime;
my ($th, $ctx) = @_;
my $inbox = $ctx->{-inbox};
my $mime;
- my @q = map { (0, $_) } $th->rootset;
+ my @q = map { (0, $_) } @{$th->{rootset}};
my $level;
while (@q) {
$level = shift @q;
my $level;
while (@q) {
$level = shift @q;