PortCalls class
Sends requests to a port of another isolate and waits for the answers.
The other side gets [replyPort, id, ...message] and answers with
[id, value], or [id, null, false] when it failed.
A request with no answer after timeout fails with a
TimeoutException. One timer checks all waiting requests, so there
is no timer per request. The timer only runs while a request waits.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- timeout → Duration
-
the most time to wait for an answer
final
- timerRuns → bool
-
true while the timer that checks for timeouts runs
no setter
- waiting → int
-
number of requests that wait for an answer
no setter
Methods
-
close(
) → void - Closes the reply port. Waiting requests fail.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
send(
SendPort to, List< Object?> message) → Future<Object?> -
Sends
messagetotoand gives the answer. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited