-
-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
engine: graph: Allow send/recv to work with autogrouped resources
We've previously not received a value from within an autogrouped resource. It turns out this would be quite useful, and so this patch implements the additional plumbing and testing so that this works! Testing that an autogrouped resource can still send values has not been done at this time.
- Loading branch information
1 parent
bf5cc63
commit 18e1f08
Showing
5 changed files
with
217 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# send/recv of value1.any into print1.msg works! | ||
value "value1" { | ||
any => "i am value1", | ||
} | ||
print "print1" { | ||
msg => "i am print1", | ||
|
||
Meta:autogroup => false, | ||
} | ||
Value["value1"].any -> Print["print1"].msg | ||
|
||
# One of these will be autogrouped into the other! The inner one can receive! | ||
# send/recv from value2.any into print2.msg works | ||
# send/recv from value3.any into (the usually autogrouped) print3 works too! | ||
value "value2" { | ||
any => "i am value2", | ||
} | ||
value "value3" { | ||
any => "i am value3", | ||
} | ||
print "print2" { | ||
msg => "i am print2", | ||
|
||
Meta:autogroup => true, | ||
} | ||
print "print3" { | ||
msg => "i am print3", | ||
|
||
Meta:autogroup => true, | ||
} | ||
Value["value2"].any -> Print["print2"].msg | ||
Value["value3"].any -> Print["print3"].msg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
-- main.mcl -- | ||
# send/recv of value1.any into print1.msg works! | ||
value "value1" { | ||
any => "i am value1", | ||
} | ||
print "print1" { | ||
msg => "i am print1", | ||
|
||
Meta:autogroup => false, | ||
} | ||
Value["value1"].any -> Print["print1"].msg | ||
|
||
# One of these will be autogrouped into the other! The inner one can receive! | ||
# send/recv from value2.any into print2.msg works | ||
# send/recv from value3.any into (the usually autogrouped) print3 works too! | ||
value "value2" { | ||
any => "i am value2", | ||
} | ||
value "value3" { | ||
any => "i am value3", | ||
} | ||
print "print2" { | ||
msg => "i am print2", | ||
|
||
Meta:autogroup => true, | ||
} | ||
print "print3" { | ||
msg => "i am print3", | ||
|
||
Meta:autogroup => true, | ||
} | ||
Value["value2"].any -> Print["print2"].msg | ||
Value["value3"].any -> Print["print3"].msg | ||
-- OUTPUT -- | ||
Edge: value[value1] -> print[print1] # value[value1] -> print[print1] | ||
Edge: value[value2] -> print[print2] # value[value2] -> print[print2] | ||
Edge: value[value3] -> print[print2] # value[value3] -> print[print3] | ||
Field: print[print1].Msg = "i am value1" | ||
Field: print[print2].Msg = "i am value2" | ||
Field: value[value1].Any = "i am value1" | ||
Field: value[value2].Any = "i am value2" | ||
Field: value[value3].Any = "i am value3" | ||
Group: print[print2]: Field: print[print3].Msg = "i am value3" | ||
Vertex: print[print1] | ||
Vertex: print[print2] | ||
Vertex: value[value1] | ||
Vertex: value[value2] | ||
Vertex: value[value3] |