According to the documentation of GlobAsyncRef it is possible use container.flush() to publish all changes. However this does unfortunately not work:
dash::Array<int> data(dash::size());
*(array.lbegin()) = 0;
array.barrier();
mutex.lock();
int tmp = array.async[0];
arrary.async[0] = tmp + 1;
array.flush(); // using gref.flush() works
mutex.unlock();
array.barrier();
// postcondition: array[0] == dash::size();
This has to be investigated further. My guess is that the problem is the value comparison in the assignment operator. Furthermore the async stuff is not threadsafe in any case.
Maybe we should document this as a known limitation in 0.3.0, as fixing this seems quite elaborate.