+ if (promises[i]==(PROMISE_RMW|PROMISE_FULFILLED))
+ rmw_count++;
+ }
+
+ for (unsigned int i = 0; i < promises.size(); i++) {
+ if ((promises[i] & PROMISE_MASK) == PROMISE_UNFULFILLED) {
+ if ((rmw_count > 0) && (promises[i] & PROMISE_RMW)) {
+ //sending our value to two rmws... not going to work..try next combination
+ continue;
+ }
+ promises[i] = (promises[i] & PROMISE_RMW) |PROMISE_FULFILLED;