mirror of
https://github.com/gui-cs/Terminal.Gui.git
synced 2025-12-31 02:08:03 +01:00
* Fixed async/await hang * Fixed async/await hang with calling Wakeup * Moved Wake Up into lock statement
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user