cleanup threads if exception is thrown to prevent segfaults and cuda errors
cleanup threads if exception is thrown to prevent segfaults and cuda
errors

gnina/gnina,gnina/gnina,gnina/gnina,gnina/gnina,gnina/gnina,gnina/gnina