* Fixed async/await hang * Fixed async/await hang with calling Wakeup * Moved Wake Up into lock statement
@@ -1717,7 +1717,7 @@ namespace Terminal.Gui {
public override void Post (SendOrPostCallback d, object state)
{
- mainLoop.AddIdle (() => {
+ mainLoop.AddIdle (() => {
d (state);
return false;
});
@@ -354,8 +354,10 @@ namespace Mono.Terminal {
/// </summary>
public Func<bool> AddIdle (Func<bool> idleHandler)
- lock (idleHandlers)
+ lock (idleHandlers) {
idleHandlers.Add (idleHandler);
+ driver.Wakeup ();
+ }
return idleHandler;
}