my $semSTDOUT :shared; sub tprint{ lock $semSTDOUT; print @_; }