fix: Fixes unresponsive console input (#1720)
### Summary Fixes an issue where the call priority of `Initialize` functions causes a dead lock because the console input handler was not initialized.
This commit is contained in:
parent
974062b0d4
commit
912eaab460
4 changed files with 15 additions and 11 deletions
|
|
@ -78,7 +78,7 @@ public class CallPriorityComparer : IComparer<MethodInfo>
|
|||
return 0;
|
||||
}
|
||||
|
||||
private int GetPriority(MethodInfo mi)
|
||||
private static int GetPriority(MethodInfo mi)
|
||||
{
|
||||
var objs = mi.GetCustomAttributes(typeof(CallPriorityAttribute), true);
|
||||
|
||||
|
|
@ -87,12 +87,7 @@ public class CallPriorityComparer : IComparer<MethodInfo>
|
|||
return 50;
|
||||
}
|
||||
|
||||
if (objs[0] is not CallPriorityAttribute attr)
|
||||
{
|
||||
return 50;
|
||||
}
|
||||
|
||||
return attr.Priority;
|
||||
return (objs[0] as CallPriorityAttribute)?.Priority ?? 50;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue