Fix race competition when the breakpoint needs be evaluated in multi threads - #325
Merged
Merged
Conversation
Jinbo Wang (testforstephen)
requested review from
Yan Zhang (Eskibear),
Rome Li (akaroml),
Andy Xu(devdiv) (andxu) and
Sheng Chen (jdneo)
March 27, 2020 10:01
Jinbo Wang (testforstephen)
force-pushed
the
jinbo_bugfix
branch
from
March 29, 2020 05:21
f019292 to
54aa30c
Compare
|
|
||
| CompletableFuture<IWatchpoint> future = new CompletableFuture<>(); | ||
| Disposable subscription = eventHub.events() | ||
| subscription = eventHub.events() |
Contributor
There was a problem hiding this comment.
add subscriptions.add(subscription)?
Contributor
Author
There was a problem hiding this comment.
the following L182 already did that.
| ASTEvaluationEngine engine = new ASTEvaluationEngine(project, debugTarget); | ||
| boolean newExpression = false; | ||
| if (breakpoint != null) { | ||
| if (StringUtils.isNotBlank(breakpoint.getLogMessage())) { |
Contributor
There was a problem hiding this comment.
why this condition is deleted: StringUtils.isNotBlank(breakpoint.getLogMessage())?
Contributor
Author
There was a problem hiding this comment.
this is not needed any more. Previously the compiled expression for the logpoint and conditional breakpoint are saved separately, so when evaluating a breakpoint, need check whether it's a logpoint or conditional breakpoint. In the new implementation, they are saved in a map, and fetched from the map directly.
…threads Signed-off-by: Jinbo Wang <[email protected]>
Signed-off-by: Jinbo Wang <[email protected]>
Jinbo Wang (testforstephen)
force-pushed
the
jinbo_bugfix
branch
from
May 7, 2020 07:58
bb8a729 to
0178dde
Compare
Andy Xu(devdiv) (andxu)
approved these changes
May 7, 2020
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.
Signed-off-by: Jinbo Wang [email protected]
Fix microsoft/vscode-java-debug#782