ResetMultithreading
Clears the component’s multithreading state and restarts its backend configuration.
Instance methodC# API
void ResetMultithreading();
Description
Removes all recurring function registrations associated with the component and resets the ThreadHarmonizer backend state using the selected configuration. Unlike DisableMultithreading, a reset does not preserve the existing registrations for a later EnableMultithreading call.
Destructive resetAll recurring function registrations for the component are removed.
Different from disableUse DisableMultithreading for a temporary pause and ResetMultithreading when the state should be rebuilt.
Clear the component state
using ThreadHarmonizerEngine;
using UnityEngine;
public class RuntimeWorker : MonoBehaviourMultithreaded
{
private void Start()
{
AddFunction(ParallelUpdate);
}
private void ParallelUpdate()
{
// Recurring worker calculation.
}
private void OnDestroy()
{
ResetMultithreading();
}
}
