Skip to content
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions Sources/NIOCore/FileHandle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,6 @@ extension NIOFileHandle {
use NIOFileSystem as a replacement API.
"""
)
@available(*, noasync, message: "This method may block the calling thread")
public convenience init(
path: String,
mode: Mode = .read,
Expand All @@ -388,7 +387,6 @@ extension NIOFileHandle {
/// - path: The path of the file to open. The ownership of the file descriptor is transferred to this `NIOFileHandle` and so it will be closed once `close` is called.
/// - mode: Access mode. Default mode is `.read`.
/// - flags: Additional POSIX flags.
@available(*, noasync, message: "This method may block the calling thread")
Copy link
Member

Choose a reason for hiding this comment

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

@glbrntt We can keep it on the new methods though, no?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, you're absolutely right.

public convenience init(
_deprecatedPath path: String,
mode: Mode = .read,
Expand All @@ -415,7 +413,6 @@ extension NIOFileHandle {
use NIOFileSystem as a replacement API.
"""
)
@available(*, noasync, message: "This method may block the calling thread")
public convenience init(path: String) throws {
try self.init(_deprecatedPath: path)
}
Expand All @@ -424,7 +421,6 @@ extension NIOFileHandle {
///
/// - Parameters:
/// - path: The path of the file to open. The ownership of the file descriptor is transferred to this `NIOFileHandle` and so it will be closed once `close` is called.
@available(*, noasync, message: "This method may block the calling thread")
public convenience init(_deprecatedPath path: String) throws {
// This function is here because we had a function like this in NIO 2.0, and the one above doesn't quite match. Sadly we can't
// really deprecate this either, because it'll be preferred to the one above in many cases.
Expand Down