-
Notifications
You must be signed in to change notification settings - Fork 655
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
remove phantom publics from EventLoop and Heap #1298
Conversation
/// The whole processing of I/O and tasks is done by a `NIOThread` that is tied to the `SelectableEventLoop`. This `NIOThread` | ||
/// is guaranteed to never change! | ||
@usableFromInline | ||
internal final class SelectableEventLoop: EventLoop { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this stuff is just moved apart from s/public/internal
and fallout like @usableFromInline
etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Sources/NIO/EventLoop.swift
Outdated
@@ -633,7 +633,8 @@ enum NIORegistration: Registration { | |||
} | |||
|
|||
/// Execute the given closure and ensure we release all auto pools if needed. | |||
private func withAutoReleasePool<T>(_ execute: () throws -> T) rethrows -> T { | |||
@inlinable | |||
internal func withAutoReleasePool<T>(_ execute: () throws -> T) rethrows -> T { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rather than make this internal
and @inlinable
, is there any reason not simply to move it to the file with its new usage?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Lukasa I can revert it but I didn't see a reason not to make it available in tests etc.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Lukasa also it now needs to be usableFromInline/inlinable which requires internal, I'll move it to the SelectableEventLoop file though
2177013
to
b573f7e
Compare
Motivation: In SelectableEventloop, Heap, PriorityQueue, etc there were quite a few phantom publics left which cause issues with apple#1257 and are confusing. Modifications: - remove the phantom publics - move SelectableEventLoop to its own file Result: - clearer what's going on (public means public)
b573f7e
to
2b80716
Compare
Motivation:
In SelectableEventloop, Heap, PriorityQueue, etc there were quite a few
phantom publics left which cause issues with #1257 and are confusing.
Modifications:
Result: