Merged
Conversation
7 tasks
awintel
approved these changes
Feb 16, 2022
Contributor
awintel
left a comment
There was a problem hiding this comment.
Looks good. Seems like a small bug fix.
If not done already, please make sure that the different usage models of RefPorts are documented.
mathisrichter
requested changes
Feb 17, 2022
Contributor
mathisrichter
left a comment
There was a problem hiding this comment.
Looks good overall - but have a look at my comment on the unit test for RefPorts in hierarchical Processes.
mathisrichter
approved these changes
Feb 17, 2022
monkin77
pushed a commit
to monkin77/thesis-lava
that referenced
this pull request
Jul 12, 2024
* - Fix problem with RefPorts (lava Issue lava-nc#160) - lexical closure problem (see https://stackoverflow.com/questions/233673/how-do-lexical-closures-work) * - Fix problem with RefPorts (lava Issue lava-nc#160) - lexical closure problem (see https://stackoverflow.com/questions/233673/how-do-lexical-closures-work) - added unit test * - adding another unit test * - fixing docstrings * - merged with main * - fixed linting issue
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Issue Number: #160
Objective of pull request: Enable usage of multiple RefPort to VarPort connections for different Vars but same Process.
Pull request checklist
Your PR fulfills the following requirements:
pyb) passes locallypyb -E unit) or (python -m unittest) passes locallyPull request type
Please check your PR type:
What is the current behavior?
What is the new behavior?
Does this introduce a breaking change?
Supplemental information
The problem was a overlooked lexical closure when using lambda functions, leading to always pick the same VarPort being serviced, despite having already done that and the other VarPort needing the service. See https://stackoverflow.com/questions/233673/how-do-lexical-closures-work for more information.