my @threads = map threads->new( \&processrefsthread, $Q ), 1 .. $T;