Skip to content
Snippets Groups Projects
Commit 2162fed0 authored by Christian Wulf's avatar Christian Wulf
Browse files

removed if in OutputPort

parent 3d0adbbc
No related branches found
No related tags found
No related merge requests found
......@@ -25,18 +25,16 @@ public final class OutputPort<T> extends AbstractPort<T> {
/**
* @param element
* to be sent
* to be sent; May not be <code>null</code>.
*/
public void send(final T element) {
if (this.pipe.add(element)) {
this.pipe.reportNewElement();
}
this.pipe.add(element);
}
/**
*
* @param signal
* to be sent
* to be sent; May not be <code>null</code>.
*/
public void sendSignal(final ISignal signal) {
this.pipe.sendSignal(signal);
......
......@@ -36,6 +36,7 @@ public final class SingleElementPipe extends AbstractIntraThreadPipe {
@Override
public boolean add(final Object element) {
this.element = element;
this.reportNewElement();
return true;
}
......
......@@ -53,6 +53,7 @@ public final class SpScPipe extends AbstractInterThreadPipe {
this.numWaits++;
Thread.yield();
}
// this.reportNewElement();
return true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment