synchronizes access to thread dictionary
task handlers take a queue to perform the failure block on now