Table of Contents

Namespace Stride.Core.Threading

Classes

ConcurrentCollectorCache<T>
ConcurrentCollectorExtensions
ConcurrentCollector<T>

A collector that allows for concurrent adding of items, as well as non-thread-safe clearing and accessing of the underlying collection.

ConcurrentPool<T>

A concurrent object pool.

Dispatcher
DispatcherLowPriority

Built for long-running background jobs, won't monopolize the CPU away from this process or the rest of the user's OS while performing tasks

ThreadPool

Thread pool for scheduling sub-millisecond actions, do not schedule long-running tasks. Can be instantiated and generates less garbage than dotnet's.

Structs

ConcurrentCollector<T>.Enumerator

Interfaces

Dispatcher.IBatchJob

An implementation of a job running in batches. Implementing this as a struct improves performance as the JIT would have an easier time inlining the call. Implementing this as a class would provide more utility as this object would be shared across all threads, allowing for interlocked operations and other communication between threads.

Delegates

DispatcherLowPriority.ProcessItemRange

Caller-defined method called by one of the threads scheduled by a ForBatchedAsync(int, ProcessItemRange) call, caller will loop through the range of items described by the two parameters