Skip to content

Commit 316b68f

Browse files
committed
Fix deadlock
1 parent 31b0095 commit 316b68f

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

WorkspaceLauncherForVSCode/Pages/VisualStudioCodePage.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,13 +113,13 @@ public override IListItem[] GetItems()
113113
#if DEBUG
114114
using var logger = new TimeLogger();
115115
#endif
116-
lock (_itemsLock)
116+
if (_allItems.Count == 0 && !IsLoading)
117117
{
118-
if (_allItems.Count == 0 && !IsLoading)
119-
{
120-
RefreshWorkspacesAsync(isUserInitiated: false).GetAwaiter().GetResult();
121-
}
118+
RefreshWorkspacesAsync(isUserInitiated: false).GetAwaiter().GetResult();
119+
}
122120

121+
lock (_itemsLock)
122+
{
123123
if (_visibleItems.Count == 0 && !IsLoading && !string.IsNullOrWhiteSpace(SearchText))
124124
{
125125
return _noResultsRefreshItem;

0 commit comments

Comments
 (0)