Couldn't you just save the clients as a hash keyed by $thr instead of as an array? I would think that this would take care of your problem by tracking the information in the main thread as opposed to getting it back from each of the individual threads.