Instance Propertyswift-nio 2.81.0NIOCore
value
Access the value
with the precondition that the code is running on eventLoop
.
var value: Value { get set }
Access the value
with the precondition that the code is running on eventLoop
.
var value: Value { get set }
import NIOCore
The core abstractions that make up SwiftNIO.
final class NIOLoopBoundBox<Value>
NIOLoopBoundBox
is an always-Sendable
, reference-typed container allowing you access to value
if and only if you are accessing it on the right EventLoop
.
convenience init(_ value: Value, eventLoop: EventLoop)
Initialise a NIOLoopBoundBox
to value
with the precondition that the code is running on eventLoop
.
static func makeBoxSendingValue(_ value: Value, as: Value.Type = Value.self, eventLoop: EventLoop) -> NIOLoopBoundBox<Value> where Value : Sendable
Initialise a NIOLoopBoundBox
by sending a Sendable
value, validly callable off eventLoop
.
static func makeEmptyBox<NonOptionalValue>(valueType: NonOptionalValue.Type = NonOptionalValue.self, eventLoop: EventLoop) -> NIOLoopBoundBox<Value> where Value == NonOptionalValue?
Initialise a NIOLoopBoundBox
that is empty (contains nil
), this does not require you to be running on eventLoop
.
let _eventLoop: EventLoop