Skip to content

Commit

Permalink
Merge pull request #771 from skadefro/master
Browse files Browse the repository at this point in the history
wewefwefew
  • Loading branch information
skadefro authored Aug 24, 2023
2 parents ce4ac16 + 10cb8fa commit b1bd271
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
15 changes: 14 additions & 1 deletion OpenRPA.CodeEditor/CodeEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,20 @@ public async static Task Initialize()
}
});
var completionService = CompletionService.GetService(ce.document);
var completionList = await Task.Run(async () => await completionService.GetCompletionsAsync(ce.document, 0));
var completionList = await Task.Run(async () =>
{
try
{
if (ce != null && ce.document != null)
{
return await completionService.GetCompletionsAsync(ce.document, 0);
}
}
catch (Exception)
{
}
return null;
});
}
catch (Exception ex)
{
Expand Down
2 changes: 1 addition & 1 deletion OpenRPA.Interfaces/GenericTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ public static void RunUI(Action action)
{
try
{
if (System.Threading.Monitor.TryEnter(statelock, Config.local.thread_lock_timeout_seconds * 1000))
if (System.Threading.Monitor.TryEnter(statelock, 10))
{
try
{
Expand Down

0 comments on commit b1bd271

Please sign in to comment.