squadron_local_worker
library
Classes
-
BaseDevSquadronLogger
-
Base class for dev loggers.
-
BaseSquadronLogger
-
Base class for simple loggers
-
CancellationToken
-
Base cancellation token.
-
Channel
-
A Channel supports communication from a client to a platform worker. It is used to send a WorkerRequest to
a platform worker.
-
CompositeToken
-
Composite cancellation token. The token is cancelled automatically depending on mode: with CompositeMode.any,
the composite token is cancelled as soon as when one of the tokens is cancelled. With CompositeMode.any, the
composite token is cancelled when all tokens are cancelled.
-
ConcurrencySettings
-
Concurrency settings governing parallelization of workers in a WorkerPool.
-
ConsoleSquadronLogger
-
Simple console logger (
print
function)
-
DevSquadronLogger
-
Simple logger based on
dart:dev
log
function
-
GenericMarshaler<T>
-
Base class to abstract
S
in SquadronMarshaler<T, S>
.
-
GenericMarshaller<T>
-
Provided temporarily for compatibility reasons. See GenericMarshaler.
-
IdentityMarshaler<T>
-
Identity marshaler.
-
IdentityMarshaller<T>
-
Provided temporarily for compatibility reasons. See IdentityMarshaler.
-
LocalWorker<W extends WorkerService>
-
Base local worker class.
-
LocalWorkerClient
-
Base class used to communicate with a LocalWorker.
-
ParentSquadronLogger
-
Logger for workers, forwarding log messages to parent
-
PerfCounter
-
Simple performance counter to consolidate statistics about woker tast execution: total number of calls, total
number of errors, total elapsed time, and max elapsed time.
-
PerfCounterSnapshot
-
A snapshot of a PerfCounter's values.
-
ServiceInstaller
-
Extend this class or implement this interface in your worker service if it needs
to take action when the worker thread is started or stopped.
-
Squadron
-
Squadron singleton. The main application thread and each worker thread will have their own private
Squadron singleton.
-
SquadronLogger
-
Basic interface for logging
-
SquadronLogLevel
-
Log level constants, compatible with
package:logging
-
SquadronMarshaler<T, S>
-
Base class to serialize/deserialize data of type
T
to a transferable type S
.
-
SquadronMarshaller<T, S>
-
Provided temporarily for compatibility reasons. See SquadronMarshaler.
-
StreamTask<T>
-
Class representing a Task returning a stream of values.
-
Task<T>
-
Base worker task class
-
TimeOutToken
-
Time-out cancellation tokens used by callers of worker services. The token is cancelled automatically after
a period of time indicated by duration with a countdown starting only when the task is assigned to a
platform worker.
-
ValueTask<T>
-
Class representing a Task returning a single value.
-
Worker
-
Base worker class.
-
WorkerChannel
-
A WorkerChannel supports communication from a platform worker to the client that posted the WorkerRequest.
It is used to send WorkerResponse back to the client.
-
WorkerPool<W extends Worker>
-
Worker pool responsible for instantiating, starting and stopping workers running in parallel.
A WorkerPool is also responsible for creating and assigning
WorkerTask
s to Workers.
-
WorkerService
-
Base class for a worker service.
-
WorkerStat
-
Base statistics for worker.
Functions
-
run(WorkerInitializer initializer, [List? command, SquadronLogger? logger])
→ void
-
Instantiates a WorkerService via the
initializer
and installs the service in a platform worker.
The command
argument is ignored on Web platforms. On native platforms, the command
argument must
be set to the Isolate's startup parameter.