Failure behavior solved. It was a threading safe issue. Driver.Wakeup () moved to the Post method on MainLoopSyncContext class solved it.

This commit is contained in:
BDisp
2020-03-11 03:17:02 +00:00
parent 6dfdf13603
commit c0f7dc5ef6
2 changed files with 3 additions and 3 deletions

View File

@@ -1726,6 +1726,7 @@ namespace Terminal.Gui {
{
mainLoop.AddIdle (() => {
d (state);
mainLoop.Driver.Wakeup ();
return false;
});
}

View File

@@ -354,10 +354,9 @@ namespace Mono.Terminal {
/// </summary>
public Func<bool> AddIdle (Func<bool> idleHandler)
{
lock (idleHandlers) {
lock (idleHandlers)
idleHandlers.Add (idleHandler);
driver.Wakeup ();
}
return idleHandler;
}