-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[mono][debugger] Concurrency on execution context dictionary #87870
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
[mono][debugger] Concurrency on execution context dictionary #87870
Conversation
|
Tagging subscribers to this area: @thaystg Issue DetailsFollow up of this #87154
|
| return false; | ||
| if (contextBag.IsEmpty) | ||
| return false; | ||
| executionContext = contextBag.Where(context => context.Id == contextBag.Where(context => context.Destroyed == false).Max(context => context.Id)).FirstOrDefault(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should work, right? Fine for a follow up PR.
| executionContext = contextBag.Where(context => context.Id == contextBag.Where(context => context.Destroyed == false).Max(context => context.Id)).FirstOrDefault(); | |
| int maxId = contextBag.Where(context => context.Destroyed == false).Max(context => context.Id); | |
| executionContext = contextBag.Where(context => context.Id == maxId).FirstOrDefault(); |
| contexts[workerSessionId] = new(); | ||
| contexts[workerSessionId].Add(context.CreateChildAsyncExecutionContext(workerSessionId)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use TryGetAndAddContext
|
Failure is unrelated: |
Follow up of this #87154