DVWorkers class final

The pool.

Constructors

DVWorkers({DVWorkerProfile? profile})
Workers carried by the target's own mechanism.
DVWorkers.inline({DVWorkerProfile? profile})
Workers that run on the calling isolate: what a target without threads gets, and what a test of that degradation constructs.

Properties

capability → DVWorkerCapability
What carries the work here, and what that costs.
no setter
hashCode → int
The hash code for this object.
no setterinherited
live → int
Threads still held -- including one whose task was cancelled and whose isolate has not finished ending. The bound applies to this number.
no setter
poolSize → int
How many tasks may hold a thread at once.
final
queued → int
Tasks waiting for a slot.
no setter
running → int
Tasks started and not yet answered.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

close() → Future<void>
Cancels everything queued and running, and completes when every thread the pool held has ended.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run<I, O>(DVWorkerTask<I, O> task, {required I input, void onProgress(DVProgress progress)?, DVCancellation? cancellation, Duration? timeout, Iterable<DVWorkerLendable> lend = const <DVWorkerLendable>[]}) → Future<DVWorkerResult<O>>
Runs task on input off the calling isolate.
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

current → DVWorkers
The application's pool: DV.Workers.
no setter

Static Methods

configure(DVWorkers workers) → void
Replaces the application's pool, e.g. with one sized from the device profile the build was made for.
debugResetOnceDiagnostics() → void
Lets a test observe the once-per-boot diagnostics again.