8000 Fix race competition when the breakpoint needs be evaluated in multi threads by testforstephen · Pull Request #325 · microsoft/java-debug · GitHub
[go: up one dir, main page]

Skip to content

Fix race competition when the breakpoint needs be evaluated in multi threads#325

Merged
testforstephen merged 2 commits int 10BC0 omasterfrom
jinbo_bugfix
May 7, 2020
Merged

Fix race competition when the breakpoint needs be evaluated in multi threads#325
testforstephen merged 2 commits intomasterfrom
jinbo_bugfix

Conversation

@testforstephen
Copy link
Contributor


CompletableFuture<IWatchpoint> future = new CompletableFuture<>();
Disposable subscription = eventHub.events()
subscription = eventHub.events()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add subscriptions.add(subscription)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the following L182 already did that.

ASTEvaluationEngine engine = new ASTEvaluationEngine(project, debugTarget);
boolean newExpression = false;
if (breakpoint != null) {
if (StringUtils.isNotBlank(breakpoint.getLogMessage())) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why this condition is deleted: StringUtils.isNotBlank(breakpoint.getLogMessage())?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 <jinbwan@microsoft.com>
Signed-off-by: Jinbo Wang <jinbwan@microsoft.com>
@testforstephen testforstephen merged commit dacf440 into master May 7, 2020
@testforstephen testforstephen deleted the jinbo_bugfix branch May 7, 2020 08:09
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.

conditional breakpoint fails if String condition is set/used

2 participants

0