barrier more efficient
Promises are now refs
added 'fence' instructions to the barrier