Skip to content

Notify the debugger of a cross-thread dependency in Lock - #101501

Merged
kouvel merged 2 commits into
dotnet:mainfrom
kouvel:LockFuncEvalFix
May 2, 2024
Merged

Notify the debugger of a cross-thread dependency in Lock#101501
kouvel merged 2 commits into
dotnet:mainfrom
kouvel:LockFuncEvalFix

Conversation

@kouvel

@kouvel kouvel commented Apr 24, 2024

Copy link
Copy Markdown
Contributor

When a FuncEval tries to acquire a Lock that is held by a different thread, notify the debugger of a cross-thread dependency.

When a FuncEval tries to acquire a Lock that is held by a different thread, notify the debugger of a cross-thread dependency.
@kouvel kouvel added this to the 9.0.0 milestone Apr 24, 2024
@kouvel
kouvel requested a review from noahfalk April 24, 2024 16:55
@kouvel kouvel self-assigned this Apr 24, 2024
@dotnet-policy-service

Copy link
Copy Markdown
Contributor

Tagging subscribers to this area: @mangod9
See info in area-owners.md if you want to be subscribed.

@kouvel

kouvel commented Apr 24, 2024

Copy link
Copy Markdown
Contributor Author

CC @tommcdon. I tried testing this locally and wasn't seeing an early abort, may be due to a different issue. Anyway based on the intent I believe this should enable an early abort.

@kouvel

kouvel commented Apr 24, 2024

Copy link
Copy Markdown
Contributor Author

With a small change to testing, I was able to verify that this works to enable quick-abort of a FuncEval when it attempts to acquire a contented lock. Thanks @tommcdon!

@tommcdon tommcdon left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM, thanks!

@kouvel
kouvel merged commit 71e9c46 into dotnet:main May 2, 2024
@kouvel
kouvel deleted the LockFuncEvalFix branch May 2, 2024 16:51
michaelgsharp pushed a commit to michaelgsharp/runtime that referenced this pull request May 9, 2024
* Notify the debugger of a cross-thread dependency in Lock

When a FuncEval tries to acquire a Lock that is held by a different thread, notify the debugger of a cross-thread dependency.
@kouvel kouvel mentioned this pull request May 14, 2024
8 tasks
Ruihan-Yin pushed a commit to Ruihan-Yin/runtime that referenced this pull request May 30, 2024
* Notify the debugger of a cross-thread dependency in Lock

When a FuncEval tries to acquire a Lock that is held by a different thread, notify the debugger of a cross-thread dependency.
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

2 participants