latchis useful for managing one task by multiple threadsbarrierhelps to manage repeated tasks by multiple threadslatchcan only be used once, but abarriercan be used more than once
latch is useful for managing one task by multiple threadsbarrier helps to manage repeated tasks by multiple threadslatch can only be used once, but a barrier can be used more than once