further work on equal and thread_exit