-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Added guards for compositor reentrancy and exposed batch lifetime events #12968
Conversation
You can test this PR using the following package version. |
/// <summary> | ||
/// Returns a task awaitable that would invoke continuation on specified dispatcher priority | ||
/// </summary> | ||
public DispatcherPriorityAwaitable AwaitWithPriority(Task task, DispatcherPriority priority) => |
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.
Interesting, can this be used like JoinableTaskFactory.SwitchToMainThreadAsync
in VS? Like this example?
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.
Yes, it can be used from background threads too.
…nts (#12968) * Added guards for compositor reentrancy and exposed batch lifetime events * Use manual continue with since our tests are using some borked sync context
…nts (#12968) * Added guards for compositor reentrancy and exposed batch lifetime events * Use manual continue with since our tests are using some borked sync context
…nts (AvaloniaUI#12968) * Added guards for compositor reentrancy and exposed batch lifetime events * Use manual continue with since our tests are using some borked sync context (cherry picked from commit 96d2ea4)
We have reports about a problem caused by reentrancy in our rendering code.
Those are hard to diagnose, since reported exception is thrown way after said reentrancy happened.
This PR:
Those won't necessary fix the issue, but at least we'll get a proper stack trace.