LevitLoopEngine class

A standalone execution engine for managing repetitive loops and long-running services.

It supports:

  • Sequential loop execution with delays.
  • Isolate-based loops for heavy background work.
  • Centralized start/pause/resume/stop control for all registered services.
Implemented types

Constructors

LevitLoopEngine()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

dispose() → void
Releases resources held by this object.
override
getServiceStatus(String id) LxReactive<LxStatus>?
Returns the status of the service with the given id, or null if not found.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pauseAllServices({bool force = false}) → void
Pauses all registered services.
pauseService(String id) → void
Pauses the service with the given id.
registerService<T extends StoppableService>(String id, T service, {bool permanent = false}) → T
Registers a service under id.
resumeAllServices({bool force = false}) → void
Resumes all registered services.
resumeService(String id) → void
Resumes the service with the given id.
startIsolateLoop(String id, FutureOr<void> body(), {Duration? delay, String? debugName, bool permanent = false}) → void
Starts a sequential loop in a separate isolate.
startLoop(String id, Future<void> body(), {Duration? delay, bool permanent = false}) → void
Starts a sequential loop with the given id and body.
stopAllServices() → void
Stops all registered services.
stopService(String id) → void
Stops the service with the given id.
toString() String
A string representation of this object.
inherited

Operators

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