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
PooledAttribute

Allows delegates passed as parameters to be allocated from a pool and recycled after the method call. To prevent recycling, use AddReference(Delegate) and Release(Delegate) to hold onto references to the delegate.

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.

IPooledClosure

Interface implemented by pooled closure types through the AssemblyProcessor. Enables PooledDelegateHelper to keep closures and delegates alive.

Delegates

Dispatcher.ValueAction<T>