added ability to return a result from a thread in the thread queue