mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[SourceKit] Introduce key for cancelling on close
Defaults to `true`.
This commit is contained in:
@@ -105,8 +105,8 @@ public:
|
||||
getLang().editorOpen(DocName, Buf.get(), Consumer, Args, std::nullopt);
|
||||
}
|
||||
|
||||
void close(const char *DocName, bool removeCache) {
|
||||
getLang().editorClose(DocName, removeCache);
|
||||
void close(const char *DocName, bool CancelBuilds, bool RemoveCache) {
|
||||
getLang().editorClose(DocName, CancelBuilds, RemoveCache);
|
||||
}
|
||||
|
||||
void getDiagnosticsAsync(
|
||||
@@ -171,7 +171,7 @@ TEST_F(CloseTest, Cancel) {
|
||||
|
||||
getCompileTracker().waitForBuildToStart();
|
||||
|
||||
close(DocName, RemoveCache);
|
||||
close(DocName, /*CancelBuilds*/ true, RemoveCache);
|
||||
|
||||
bool Expired = BuildResultSema.wait(30 * 1000);
|
||||
if (Expired)
|
||||
|
||||
Reference in New Issue
Block a user