         }
     }
 
-    @inlinable public func reentrantChannelReception(_ element: Any) {
+    public func reentrantChannelReception(_ element: Any) {
         #if DEBUG_CHANNELZ
             //print("ChannelZ reentrant channel short-circuit; break on \(#function) to debug", type(of: element))
             ChannelZReentrantReceptions.increment()

    public typealias Receptor = (T) -> ()
    public let maxdepth: Int

    @usableFromInline var receivers: ContiguousArray<(index: Int64, receptor: Receptor)> = []
    @usableFromInline let entrancy: Counter = 0
    @usableFromInline let receptorIndex: Counter = 0

    public var count: Int { return receivers.count }

    // os_unfair_lock would probably be faster (albeit unfair), but it seems to crash on forked processes (like when XCode unit tests in parallel; https://forums.developer.apple.com/thread/60622)
    // @usableFromInline let lock = UnfairLock()
    @usableFromInline let lock = ReentrantLock()

    @inlinable public init(maxdepth: Int? = nil) {
        self.maxdepth = maxdepth ?? ChannelZReentrancyLimit
    }

    @inlinable public func receive(_ element: T) {
        lock.lock()
        defer { lock.unlock() }


    }

    /// Adds a receiver that will return a receipt that simply removes itself from the list
    public func addReceipt(_ receptor: @escaping Receptor) -> Receipt {
        let token = addReceiver(receptor)
        return ReceiptOf(canceler: { self.removeReceptor(token) })
    }

    /// Adds a custom receiver block and returns a token that can later be used to remove the receiver
    public func addReceiver(_ receptor: @escaping Receptor) -> Int64 {
        precondition(entrancy.get() == 0, "cannot add to receivers while they are flowing")
        let index = receptorIndex.increment()
        receivers.append((index, receptor))
        return index
    }

    public func removeReceptor(_ index: Int64) {
        receivers = receivers.filter { $0.index != index }
    }

    /// Clear all the receivers
    public func clear() {
        receivers = []
    }
}

open class ReceiverQueueSource<T> {
    let receivers = ReceiverQueue<T>()
}

/// A Lock used for synchronizing access to the receiver queue
protocol Lock {
    init()
    func lock()
    func unlock()
