-
Notifications
You must be signed in to change notification settings - Fork 656
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make _NIOFileSystem strict concurrency compatible (#3098)
Motivation: We're continuing out Strict Concurrency journey, making sure users of NIO can write data-race-free code. Modifications: - Added some missing Sendable annotations in NIOAsyncSequenceProducer - Made BufferedStream unconditionally Sendable, and required its Element type to also be Sendable. The prior constraint wasn't actually correct. We always behaved as though the element types were Sendable, by passing them into continuations. This cleans things up. - Made AnyAsyncSequence Sendable, which it needs to be. - Made BufferedOrAnyStream Sendable, which it needs to be. - Made DirectoryEntries explicitly Sendable, which it was. - Made DirectoryEntries.Batched explicitly Sendable. Result: Better concurrency-safety
- Loading branch information
Showing
5 changed files
with
20 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters