Avoid capturing shared state by Event Write Context#1126
Merged
0xnm merged 1 commit intoNov 7, 2022
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## feature/sdkv2 #1126 +/- ##
=================================================
+ Coverage 82.44% 82.53% +0.10%
=================================================
Files 347 347
Lines 11375 11394 +19
Branches 1918 1918
=================================================
+ Hits 9377 9404 +27
+ Misses 1416 1415 -1
+ Partials 582 575 -7
🚀 New features to boost your workflow:
|
mariusc83
approved these changes
Nov 4, 2022
mariusc83
approved these changes
Nov 4, 2022
xgouchet
approved these changes
Nov 7, 2022
0xnm
force-pushed
the
nogorodnikov/avoid-capturing-shared-fields-by-event-write-context
branch
from
November 7, 2022 12:51
f6b1b5c to
ca3c664
Compare
0xnm
deleted the
nogorodnikov/avoid-capturing-shared-fields-by-event-write-context
branch
November 7, 2022 13:25
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.
What does this PR do?
Bugfix for #1117: since EWC is executed on the worker thread, by the time we get the context shared fields/state may already be changed.
This PR avoids that by making sure that EWC captures only the local state or immutable shared state.
Review checklist (to be filled by reviewers)