PullReplies class
A bounded channel of query replies: replies accumulate and the caller takes them out on demand.
The channel-mode sibling of the stream returned by Session.get. Where the
stream pushes every reply as it arrives and buffers without bound, this
holds at most capacity replies and lets the consumer set the pace.
The kind chosen at the call decides what happens when the buffer fills: ChannelKind.ring drops the oldest reply and never blocks the replier, ChannelKind.fifo keeps every reply and blocks the replier instead. Both behaviours are canon's own, rendered here unsmoothed.
This channel terminates by itself. Unlike a subscriber's channel, there
is no entity to undeclare: canon drops the reply closure once all replies
are processed, so RecvDisconnected here means "this query is finished".
That is also why the release below is dispose and not close — dropping
the receiving end tells no peer anything, and the query still runs to
completion natively.
This object holds a native handle, so it cannot cross an isolate
boundary: a copy would share this one's native address while carrying
its own fresh disposal flag, and the second release would be a
use-after-free. Sending it throws ArgumentError naming the class.
⛔ No NativeFinalizer is attached to this class, deliberately: as
PullSubscriber — its close ordering is half Dart-side, which a finalizer
callback cannot run.
Releasing it explicitly is therefore the only thing that reclaims it.
- Implemented types
Constructors
-
PullReplies(Pointer<
Uint8> _handlerHandle, Pointer<Uint8> _teeHandle, ReceivePort _receivePort, ChannelKind _kind, [bool _retainPayload = false]) - Internal constructor. Use Session.pullGet instead.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- kind → ChannelKind
-
The bounded channel kind backing this handle.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → void - Releases this handle.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
recv(
) → Future< RecvResult< Reply> > - Waits for the next reply.
-
toString(
) → String -
A string representation of this object.
inherited
-
tryRecv(
) → RecvResult< Reply> - Tries to take one reply, without waiting.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited