示例#1
0
 /**
  * Notify this {@code Composable} that an error is being propagated through this {@code
  * Composable}.
  *
  * @param error the error to propagate
  */
 void notifyError(Throwable error) {
   lock.lock();
   try {
     errorCount++;
     errorAccepted(error);
   } finally {
     lock.unlock();
   }
   events.notify(error.getClass(), Event.wrap(error));
 }
示例#2
0
 /**
  * Notify this {@code Composable} that a value is being accepted by this {@code Composable}.
  *
  * @param value the value to accept
  */
 void notifyValue(T value) {
   lock.lock();
   try {
     acceptCount++;
     valueAccepted(value);
   } finally {
     lock.unlock();
   }
   events.notify(accept.getT2(), Event.wrap(value));
 }