A principal solution to ghost threads and silent exceptions