I actually am pondering a similar problem. The best solution that I have come up with is to place all output into a hash as a string (have each entry of output be a new record in the hash), then when all children have finished execution, and control returns to the parent thread, shoot through the hash, and output every entry on a new line. This can be cumbersome if you are recording a lot of records, unfortunately.