Table of Contents

Class TWParallel

Namespace
TaleWorlds.Library
Assembly
TaleWorlds.Library.dll
public static class TWParallel
Inheritance
TWParallel
Inherited Members

Fields

IsInParallelFor

public static bool IsInParallelFor

Field Value

bool

Methods

AssertIsMainThread()

[Conditional("_RGL_KEEP_ASSERTS")]
public static void AssertIsMainThread()

For(int, int, float, ParallelForWithDtAuxPredicate, int)

public static void For(int fromInclusive, int toExclusive, float deltaTime, TWParallel.ParallelForWithDtAuxPredicate body, int grainSize = 16)

Parameters

fromInclusive int
toExclusive int
deltaTime float
body TWParallel.ParallelForWithDtAuxPredicate
grainSize int

For(int, int, ParallelForAuxPredicate, int)

public static void For(int fromInclusive, int toExclusive, TWParallel.ParallelForAuxPredicate body, int grainSize = 16)

Parameters

fromInclusive int
toExclusive int
body TWParallel.ParallelForAuxPredicate
grainSize int

ForEach<TSource>(IEnumerable<TSource>, Action<TSource>)

public static ParallelLoopResult ForEach<TSource>(IEnumerable<TSource> source, Action<TSource> body)

Parameters

source IEnumerable<TSource>
body Action<TSource>

Returns

ParallelLoopResult

Type Parameters

TSource

ForEach<TSource>(IList<TSource>, Action<TSource>)

[Obsolete("Please use For() not ForEach() for better Parallel Performance.", true)]
public static void ForEach<TSource>(IList<TSource> source, Action<TSource> body)

Parameters

source IList<TSource>
body Action<TSource>

Type Parameters

TSource

InitializeAndSetImplementation(IParallelDriver)

public static void InitializeAndSetImplementation(IParallelDriver parallelDriver)

Parameters

parallelDriver IParallelDriver

IsMainThread()

public static bool IsMainThread()

Returns

bool

This page was last modified at 09/01/2024 16:12:00 +00:00 (UTC).