Added __attribute__((noreturn)) to threads