Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion Sources/AsyncChannels/Channel+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ extension Channel {
/// Do not use this function in an async task!
public func blockingReceive() -> T? {
let semaphore = DispatchSemaphore(value: 0)
var val: T?
nonisolated(unsafe) var val: T?
Task {
val = await <-self
semaphore.signal()
Expand Down
2 changes: 1 addition & 1 deletion Sources/AsyncChannels/ThrowingChannel+Extensions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ extension ThrowingChannel {
/// Do not use this function in an async task!
public func blockingReceive() -> T? {
let semaphore = DispatchSemaphore(value: 0)
var val: T?
nonisolated(unsafe) var val: T?
Task {
val = await <-self
semaphore.signal()
Expand Down
Loading