SynchronizationManager class
Coordinates timing and synchronisation of multiple processing streams.
Responsibilities
- Ensures that perception, reasoning, and memory operations are synchronised at appropriate tick rates.
- Prevents race conditions between concurrent workspace updates.
- Emits synchronisation events to registered listeners.
Constructors
- SynchronizationManager({int tickIntervalMs = 100, ConsciousnessLogger? logger})
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isRunning → bool
-
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- tickIntervalMs → int
-
final
Methods
-
addListener(
void listener(SyncEvent)) → void - Adds a listener that is called every synchronisation tick.
-
getStreamStats(
) → Map< String, Map< String, dynamic> > - Returns statistics for all streams.
-
markComplete(
String streamName) → void - Marks a stream as having completed one processing step.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
registerStream(
ProcessingStream stream) → void - Registers a ProcessingStream with this synchronizer.
-
removeListener(
void listener(SyncEvent)) → void - Removes a listener.
-
start(
) → void - Starts the synchronisation tick timer.
-
stop(
) → void - Stops the tick timer.
-
toString(
) → String -
A string representation of this object.
override
-
unregisterStream(
String name) → void - Unregisters a stream.
-
waitForSync(
{Duration timeout = const Duration(seconds: 5)}) → Future< void> - Awaits until all registered streams are synchronised.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited