Smartening up threads