Revert changes to thread monitoring

There's a still a bug in them, but let's not change it in this PR.