Call error if thread creation failed.