Skip to content

WpfMessagePumpStrategy - change from Dispatcher.Run to Dispatcher.PushFrame  #4602

Description

@soerendd

Currently when awaiting an awaitable test nunit post to the context and calls Dispatcher.Run. In the Post a continuation is scheduled which calls ExitAllFrames on the dispatcher. This leads to some problems if there is already a frame running.

My idea (and I have a working version) is to create a DispatcherFrame and call PushFrame on the Dispatcher. If the posted action is completed just set frame.Continue to false. This will cause the PushFrame to return and will not disturb a previously pushed frame. Would you guys be interested in a PR for this?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions