You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When standard UI thread loop is replaced with JoinableTaskFactory job, Dispatcher.Invoke is blocked until job is completed. This may end up in a deadlock if calling code has switched from UI thread to background using СonfigureAwait(false) or any other custom awaiter.
Issue can be easily got around by calling all interactive window methods from UI thread, but it eliminates the advantage of calling IInteractiveWindow.Write from background thread. Maybe this method can use BeginInvoke instead.
Scenario: User inputs some command into interactive window. InteractiveEvaluator.ExecuteCodeAsync switches to background thread and waits until command is completed. Command produces some output which we have to print to user while it is coming. If command produces too much output and for each of it we have to create a task in Dispatcher, we get too many of them which is noticeable by user.
The text was updated successfully, but these errors were encountered:
When standard UI thread loop is replaced with
JoinableTaskFactory
job,Dispatcher.Invoke
is blocked until job is completed. This may end up in a deadlock if calling code has switched from UI thread to background usingСonfigureAwait(false)
or any other custom awaiter.Issue can be easily got around by calling all interactive window methods from UI thread, but it eliminates the advantage of calling
IInteractiveWindow.Write
from background thread. Maybe this method can useBeginInvoke
instead.Scenario: User inputs some command into interactive window. InteractiveEvaluator.ExecuteCodeAsync switches to background thread and waits until command is completed. Command produces some output which we have to print to user while it is coming. If command produces too much output and for each of it we have to create a task in Dispatcher, we get too many of them which is noticeable by user.
The text was updated successfully, but these errors were encountered: