Jerry, thanks a lot for the fix, I'll test it and report the results.
As for the code simplification, this form:
my @cmdlist :shared;
will not work in this module, because I load Threads module via require() after checking that threads are enabled in the Torrus configuration. I checked this before, and ":shared" declaration works only with "use threads", but not with "require threads".