Documentation › ResetMultithreading
ResetMultithreading
Clears the component’s registered multithreading workflow so it can be configured again.
Instance method
C# API
METHOD SIGNATURE
void ResetMultithreading();
Description
Resets the ThreadHarmonizer state associated with this component and removes its current recurring function registrations. Call AddFunction again for every function that should participate after the reset.
Clears registrations
Recurring functions must be registered again after the reset.
Reconfiguration
Use this when the component’s worker workflow must be rebuilt from a clean state.
Code Example
EXAMPLE
using ThreadHarmonizerEngine;
using UnityEngine;
public class ResettableCalculation : MonoBehaviourMultithreaded
{
private void Start()
{
ConfigureWorkers();
}
public void ReconfigureWorkers()
{
ResetMultithreading();
ConfigureWorkers();
}
private void ConfigureWorkers()
{
AddFunction(ParallelUpdate);
}
private void ParallelUpdate()
{
// Recurring Unity-independent calculation.
}
}
