Assuming you mean for threads in your kernel, you could just have them return if they meet the condition, and any other threads that didn’t meet the condition would continue their execution
if(condition){
//threads that meet the condition exit
return;
}
//threads that didnt meet the condition continue execution
something...