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

Fix data aliasing issues #200

Merged
merged 2 commits into from
Mar 6, 2016
Merged

Conversation

djmitche
Copy link
Contributor

@djmitche djmitche commented Mar 5, 2016

This categorically addresses the unintended sharing of data structures between cluster components; #198 is one example of this issue.

Note that this makes a fresh copy of the message for each destination, avoiding aliasing either between the source and destination, or between multiple destinations.

This requires a little trickiness in Python: since we use message in a closure, we need a distinct variable for each destination, and we need to make that copy during the send invocation, not when the timer expires.

@MichaelDiBernardo
Copy link
Collaborator

Cool, thank you @djmitche! I'll check up before publication to make sure that these code changes propagate to anyplace they may be in the chapter.

MichaelDiBernardo added a commit that referenced this pull request Mar 6, 2016
@MichaelDiBernardo MichaelDiBernardo merged commit 733686d into aosabook:master Mar 6, 2016
@djmitche
Copy link
Contributor Author

djmitche commented Mar 6, 2016

Awesome, thanks!

On Sun, Mar 6, 2016 at 10:01 AM, Michael DiBernardo <
notifications@github.com> wrote:

Cool, thank you @djmitche https://github.com/djmitche! I'll check up
before publication to make sure that these code changes propagate to
anyplace they may be in the chapter.


Reply to this email directly or view it on GitHub
#200 (comment).

MichaelDiBernardo added a commit that referenced this pull request Apr 9, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants