mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Put a lock around GetOutputFileNames
This commit is contained in:
parent
d62a78fe74
commit
2c1d38d45f
3 changed files with 14 additions and 1 deletions
|
@ -1262,6 +1262,9 @@ namespace IDE
|
|||
|
||||
Workspace.Options workspaceOptions = gApp.GetCurWorkspaceOptions();
|
||||
BfCompiler bfCompiler = gApp.mBfBuildCompiler;
|
||||
BfSystem bfSystem = gApp.mBfBuildSystem;
|
||||
|
||||
bfSystem.Lock(0);
|
||||
var bfProject = gApp.mBfBuildSystem.mProjectMap[project];
|
||||
bool bfHadOutputChanges = false;
|
||||
List<String> bfFileNames = scope List<String>();
|
||||
|
@ -1284,6 +1287,8 @@ namespace IDE
|
|||
bfCompiler.GetOutputFileNames(bfProject, .FlushQueuedHotFiles, out bfHadOutputChanges, bfFileNames);
|
||||
defer:: ClearAndDeleteItems(bfFileNames);
|
||||
}
|
||||
bfSystem.Unlock();
|
||||
|
||||
if (bfHadOutputChanges)
|
||||
project.mNeedsTargetRebuild = true;
|
||||
|
||||
|
|
|
@ -10400,10 +10400,16 @@ namespace IDE
|
|||
return;
|
||||
|
||||
BfCompiler bfCompiler = mBfBuildCompiler;
|
||||
BfSystem bfSystem = mBfBuildSystem;
|
||||
|
||||
var bfProject = mBfBuildSystem.mProjectMap[project];
|
||||
bool bfHadOutputChanges;
|
||||
List<String> bfFileNames = scope List<String>();
|
||||
|
||||
bfSystem.Lock(0);
|
||||
bfCompiler.GetOutputFileNames(bfProject, .None, out bfHadOutputChanges, bfFileNames);
|
||||
bfSystem.Unlock();
|
||||
|
||||
defer ClearAndDeleteItems(bfFileNames);
|
||||
if (bfHadOutputChanges)
|
||||
project.mNeedsTargetRebuild = true;
|
||||
|
|
|
@ -10431,8 +10431,10 @@ enum BfUsedOutputFlags
|
|||
|
||||
BF_EXPORT const char* BF_CALLTYPE BfCompiler_GetUsedOutputFileNames(BfCompiler* bfCompiler, BfProject* bfProject, BfUsedOutputFlags flags, bool* hadOutputChanges)
|
||||
{
|
||||
BP_ZONE("BfCompiler_GetUsedOutputFileNames");
|
||||
bfCompiler->mSystem->AssertWeHaveLock();
|
||||
|
||||
BP_ZONE("BfCompiler_GetUsedOutputFileNames");
|
||||
|
||||
*hadOutputChanges = false;
|
||||
String& outString = *gTLStrReturn.Get();
|
||||
outString.clear();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue