Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use NIOThreadPool in NIOFileSystem #2692

Merged
merged 2 commits into from
Mar 26, 2024

Conversation

glbrntt
Copy link
Contributor

@glbrntt glbrntt commented Mar 25, 2024

Motivation:

There are two thread pools: one in NIOFileSystem and one in NIOPosix; we should avoid the duplication.

Modifications:

  • Switch to using NIOThreadPool
  • Remove the old thread pool and associated code
  • Add an init to FileSystem which takes a thread pool

Result:

Less duplication

Motivation:

There are two thread pools: one in NIOFileSystem and one in NIOPosix; we
should avoid the duplication.

Modifications:

- Switch to using NIOThreadPool
- Remove the old thread pool and associated code
- Add an init to FileSystem which takes a thread pool

Result:

Less duplication
@glbrntt glbrntt requested a review from gjcairo March 25, 2024 16:08
@glbrntt glbrntt added the semver/patch No public API change. label Mar 25, 2024
Copy link
Contributor

@gjcairo gjcairo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice one!

@glbrntt
Copy link
Contributor Author

glbrntt commented Mar 25, 2024

API breakage is expected, we removed public-but-spi types from NIOFileSystem:

16:11:14   💔 API breakage: class IOExecutor has been removed
16:11:14   💔 API breakage: constructor SystemFileHandle.init(takingOwnershipOf:path:materialization:executor:) has been removed

@glbrntt glbrntt merged commit 2d840c5 into apple:main Mar 26, 2024
7 of 9 checks passed
@glbrntt glbrntt deleted the update-niofs-thread-pool branch March 26, 2024 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver/patch No public API change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants