Changed synchronizationBarrier to use promises.