1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

DoRefreshCollapse BfSystem lock fix

This commit is contained in:
Brian Fiete 2022-05-07 06:26:12 -07:00
parent 5af381f538
commit 8dc2cf9652
3 changed files with 17 additions and 2 deletions

View file

@ -1448,6 +1448,7 @@ namespace IDE.ui
public void DoRefreshCollapse(BfParser parser, int32 textVersion, IdSpan charIdSpan)
{
var bfCompiler = BfResolveCompiler;
var bfSystem = BfResolveSystem;
String explicitEmitTypeNames = scope .();
for (var explicitType in mExplicitEmitTypes)
@ -1459,6 +1460,7 @@ namespace IDE.ui
var resolvePassData = parser.CreateResolvePassData(.None);
defer delete resolvePassData;
bfSystem.Lock(0);
var collapseData = bfCompiler.GetCollapseRegions(parser, resolvePassData, explicitEmitTypeNames, .. scope .());
using (mMonitor.Enter())
{
@ -1468,6 +1470,7 @@ namespace IDE.ui
mQueuedCollapseData.mTextVersion = textVersion;
mQueuedCollapseData.mCharIdSpan = charIdSpan;
}
bfSystem.Unlock();
}
public void DoFullClassify(ResolveParams resolveParams)