SendCallGate class final
One streamed send whose native call may run on another isolate. While that call is inside native, LiteRT-LM may already have called back with the turn's end (a prefill refused at once): ending the turn then would hand the engine lock on, let a close delete the conversation or a shutdown delete the engine, under a call still running on them. So an end that arrives during the call is held and applied once the call has returned (flushEnd); and the message strings the call reads are freed only when both the stream is done with them (release) and the call has returned.
- Annotations
-
- @visibleForTesting
Constructors
- SendCallGate({required void freeStrings()})
Properties
- callInFlight → bool
-
The native call is running on another isolate.
no setter
- freeStrings → void Function()
-
Frees the message strings; called once.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
callReturned(
) → void - The call returned: frees the strings if the stream is done with them. The held end is applied by flushEnd, after the call's own result.
-
callStarted(
) → void -
end(
void end()) → void -
Ends the turn with
endnow, or, while the call runs, once it has returned. The first end wins. -
flushEnd(
) → void - Applies an end held during the call.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
release(
) → void - The stream is done with the strings.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited