prepare<T> static method

IsolateManager<T> prepare<T>(
  1. T isolateInput, {
  2. required void isolateEntryPoint(
    1. IsolateParameter<T>
    ),
  3. required FromErrorMessage customMessageToError,
  4. Duration timeout = const Duration(seconds: 30),
})

Implementation

static IsolateManager<T> prepare<T> (T isolateInput,
                                          {required void Function(IsolateParameter<T>) isolateEntryPoint,
                                            required FromErrorMessage customMessageToError,
                                            Duration timeout = const Duration(seconds: 30)})
{
  final isolateParam = IsolateParameter (isolateInput);
  final ih = IsolateHelper.spawn (isolateEntryPoint, isolateParam, customMessageToError: customMessageToError);

  return IsolateManager._(ih, timeout: timeout);
}