QuantizeServiceWorker class base

Worker for QuantizeService

Implemented types
Available extensions

Constructors

QuantizeServiceWorker({PlatformThreadHook? threadHook, ExceptionManager? exceptionManager})
QuantizeServiceWorker.js({PlatformThreadHook? threadHook, ExceptionManager? exceptionManager})
QuantizeServiceWorker.vm({PlatformThreadHook? threadHook, ExceptionManager? exceptionManager})
QuantizeServiceWorker.wasm({PlatformThreadHook? threadHook, ExceptionManager? exceptionManager})

Properties

channelLogger ↔ Logger?
getter/setter pairinherited
exceptionManager → ExceptionManager
finalinherited
hashCode → int
The hash code for this object.
no setterinherited
isConnected → bool
Returns true if the Worker is connected i.e., it has a valid Channel. Returns false otherwise.
no setterinherited
isReleased → bool
Returns true if the instance has been released, false otherwise.
no setterinherited
isStopped → bool
no setterinherited
operations → OperationsMap
Workers do not need an operations map.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

autoRelease(List<Releasable?> instances) → void
The autoRelease method is used to register a set of Releasable instances that will be automatically released when this instance becomes unreachable. Please note that this mechanism is based on Dart's Finalizer feature which makes no guarantee that it will ever be called. Depending on instance dependencies and their relationship with the internal Finalizer instance, it may even never be called. For instance, make sure this is never passed to autoRelease as this will create a cyclic graph of dependencies that will prevent finalization to happen.
inherited
getLocalWorker([ExceptionManager? exceptionManager]) → LocalWorker<QuantizeService>

Available on QuantizeService, provided by the $QuantizeServiceLocalWorkerExt extension

getSharedChannel() → Channel?
Shared Channel that can be used to communicate with the worker.
inherited
getStartArgs() → List?
The Worker's start arguments.
getStats() → WorkerStat
Worker statistics.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
quantize(List<int> argbs, int maxColors) → Future<QuantizerResult>
inherited
release() → void
The release method must be overriden in derived classes to clean up any resources they use. Implementations should not throw and must call super.release() in a finally block. If a derived class defines Releasable fields, these fields should be released of in this method. Note for implementers: it should be safe to call this method several times.
inherited
send(int command, {List args = const [], CancelationToken? token, bool inspectRequest = false, bool inspectResponse = false}) → Future
Sends a workload to the worker.
inherited
start() → Future<Channel>
Creates a Channel and starts the worker using the _entryPoint.
inherited
stop() → void
Stops this worker.
inherited
stream(int command, {List args = const [], CancelationToken? token, bool inspectRequest = false, bool inspectResponse = false}) → Stream
Sends a streaming workload to the worker.
inherited
terminate([TaskTerminatedException? ex]) → void
Terminates this worker.
inherited
toString() → String
A string representation of this object.
inherited
track() → void
Implementations should call this method e.g. at construction time to make sure they will be trackable in debugging scenarios. See ReleasableTracker.enable for more information.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited