Search in sources :

Example 6 with Mutable

use of suite.adt.Mutable in project suite by stupidsing.

the class RequestResponseMatcher method onResponseReceived.

public void onResponseReceived(int token, Bytes response) {
    Pair<Mutable<Bytes>, Condition> pair = requests.get(token);
    Mutable<Bytes> holder = pair.t0;
    Condition condition = pair.t1;
    condition.thenNotify(() -> holder.set(response));
}
Also used : Condition(suite.concurrent.Condition) Mutable(suite.adt.Mutable) Bytes(suite.primitive.Bytes)

Aggregations

Mutable (suite.adt.Mutable)6 Fail (suite.util.Fail)5 ArrayList (java.util.ArrayList)4 HashMap (java.util.HashMap)4 List (java.util.List)4 Map (java.util.Map)4 Suite (suite.Suite)4 Pair (suite.adt.pair.Pair)4 Iterator (java.util.Iterator)3 ListMultimap (suite.adt.map.ListMultimap)3 IList (suite.immutable.IList)3 ProverConfig (suite.lp.Configuration.ProverConfig)3 CompileExpressionImpl (suite.lp.compile.impl.CompileExpressionImpl)3 Binder (suite.lp.doer.Binder)3 BinderFactory (suite.lp.doer.BinderFactory)3 BindEnv (suite.lp.doer.BinderFactory.BindEnv)3 Bind_ (suite.lp.doer.BinderFactory.Bind_)3 Cloner (suite.lp.doer.Cloner)3 Clone_ (suite.lp.doer.ClonerFactory.Clone_)3 Evaluate_ (suite.lp.doer.EvaluatorFactory.Evaluate_)3