Skip to content

Commit 59d4264

Browse files
committed
Removed one Thread.interrupted check, and added some more documentation
1 parent ffc89d0 commit 59d4264

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/main/java/org/numenta/nupic/network/Layer.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -846,10 +846,6 @@ public void run() {
846846

847847
Layer.this.compute((T)intArray);
848848

849-
if(Thread.currentThread().isInterrupted()) {
850-
notifyError(new RuntimeException("Unknown Exception during compute"));
851-
}
852-
853849
// Notify all downstream observers that the stream is closed
854850
if(!sensor.hasNext()) {
855851
notifyComplete();
@@ -1207,6 +1203,11 @@ void notifyComplete() {
12071203
publisher.onCompleted();
12081204
}
12091205

1206+
/**
1207+
* Called internally to propagate the specified {@link Exception}
1208+
* up the network hierarchy
1209+
* @param e the exception to notify users of
1210+
*/
12101211
void notifyError(Exception e) {
12111212
for(Observer<Inference> o : subscribers) {
12121213
o.onError(e);

0 commit comments

Comments
 (0)