@@ -625,7 +625,7 @@ class FileSystemTests: XCTestCase {
625
625
// Sum and write back to file.
626
626
try fs. writeFileContents ( fileA, bytes: ByteString ( encodingAsUTF8: String ( valueA + 1 ) ) )
627
627
628
- sched_yield ( )
628
+ Thread . yield ( )
629
629
630
630
// Get thr current contents of the file if any.
631
631
let valueB : Int
@@ -645,7 +645,7 @@ class FileSystemTests: XCTestCase {
645
645
try ! fs. withLock ( on: lockFile, type: . shared) {
646
646
try XCTAssertEqual ( fs. readFileContents ( fileA) , fs. readFileContents ( fileB) )
647
647
648
- sched_yield ( )
648
+ Thread . yield ( )
649
649
650
650
try XCTAssertEqual ( fs. readFileContents ( fileA) , fs. readFileContents ( fileB) )
651
651
}
@@ -677,7 +677,7 @@ class FileSystemTests: XCTestCase {
677
677
// Sum and write back to file.
678
678
try localFileSystem. writeFileContents ( fileA, bytes: ByteString ( encodingAsUTF8: String ( valueA + 1 ) ) )
679
679
680
- sched_yield ( )
680
+ Thread . yield ( )
681
681
682
682
// Get thr current contents of the file if any.
683
683
let valueB : Int
@@ -697,7 +697,7 @@ class FileSystemTests: XCTestCase {
697
697
try ! localFileSystem. withLock ( on: lockFile, type: . shared) {
698
698
try XCTAssertEqual ( localFileSystem. readFileContents ( fileA) , localFileSystem. readFileContents ( fileB) )
699
699
700
- sched_yield ( )
700
+ Thread . yield ( )
701
701
702
702
try XCTAssertEqual ( localFileSystem. readFileContents ( fileA) , localFileSystem. readFileContents ( fileB) )
703
703
}
@@ -737,7 +737,7 @@ class FileSystemTests: XCTestCase {
737
737
// Sum and write back to file.
738
738
try ! fs. writeFileContents ( fileA, bytes: ByteString ( encodingAsUTF8: String ( valueA + 1 ) ) )
739
739
740
- sched_yield ( )
740
+ Thread . yield ( )
741
741
742
742
// Get thr current contents of the file if any.
743
743
let valueB : Int
@@ -757,7 +757,7 @@ class FileSystemTests: XCTestCase {
757
757
try ! fs. withLock ( on: lockFile, type: . shared) {
758
758
try XCTAssertEqual ( fs. readFileContents ( fileA) , fs. readFileContents ( fileB) )
759
759
760
- sched_yield ( )
760
+ Thread . yield ( )
761
761
762
762
try XCTAssertEqual ( fs. readFileContents ( fileA) , fs. readFileContents ( fileB) )
763
763
}
0 commit comments