Send threads message to stop and then send cancel message but don't pthread_join them if they're stuck nor reinit the opencl code to not hang everything.