Skip to content

Commit

Permalink
Sendable.
Browse files Browse the repository at this point in the history
  • Loading branch information
maxgoedjen committed Dec 11, 2023
1 parent 39a2cc5 commit 9a737fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Sources/Packages/Sources/SecretAgentKit/Agent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ extension Agent {
/// - writer: A ``FileHandleWriter`` to write the response to.
/// - Return value:
/// - Boolean if data could be read
@discardableResult public func handle(reader: FileHandleReader, writer: FileHandleWriter) async -> Bool {
@discardableResult @Sendable public func handle(reader: FileHandleReader, writer: FileHandleWriter) async -> Bool {
logger.debug("Agent handling new data")
let data = Data(reader.availableData)
guard data.count > 4 else { return false}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Foundation

/// Protocol abstraction of the reading aspects of FileHandle.
public protocol FileHandleReader {
public protocol FileHandleReader: Sendable {

/// Gets data that is available for reading.
var availableData: Data { get }
Expand All @@ -13,7 +13,7 @@ public protocol FileHandleReader {
}

/// Protocol abstraction of the writing aspects of FileHandle.
public protocol FileHandleWriter {
public protocol FileHandleWriter: Sendable {

/// Writes data to the handle.
func write(_ data: Data)
Expand Down

0 comments on commit 9a737fe

Please sign in to comment.