in reply to Unable to lock shared value

It's the array that's shared, not the reference. Fix:
lock(@{$self->{queue}});