use of co.paralleluniverse.strands.channels.SelectActionImpl in project quasar by puniverse.
the class ValChannel method register.
@Override
public Object register(SelectAction<V> action1) {
SelectActionImpl<V> action = (SelectActionImpl<V>) action1;
if (action.isData())
throw new UnsupportedOperationException("Send is not supported by DelayedValChanel");
Condition sync = dv.getSync();
if (sync == null) {
if (!action.lease())
return null;
action.setItem(dv.getValue());
action.won();
return null;
}
sync.register();
return action;
}
Aggregations