Fix windows build
Refactor to use Barrier