Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

now considering case of empty input when computing output of parallel… #44

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/FingerBoard-Core/FBFlowInstance.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ FBFlowInstance >> nextTransition [
]

{ #category : #accessing }
FBFlowInstance >> parallelExecutorFrom: aNode [
FBFlowInstance >> parallelExecutorFrom: aNode ifAbsent: aBlock [

^ executors detect: [ :each | each isParallel and: [each node = aNode] ]
^ executors detect: [ :each | each isParallel and: [each node = aNode] ] ifNone: aBlock
]

{ #category : #accessing }
Expand Down
3 changes: 2 additions & 1 deletion source/FingerBoard-Core/FBParallelNode.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ FBParallelNode >> outputFor: anActivation [
if no execution in progress, returns the first element of the input value"

| executor |
executor := anActivation instance parallelExecutorFrom: self.

executor := anActivation instance parallelExecutorFrom: self ifAbsent: ["if there was no input, there was no output for the parallel node"^ nil].
^ executor outputFor: anActivation
]
Loading