Click or drag to resize

IThreadLocalT Interface

IThreadLocal provides the engine with a way to store information that is local to the instance and a the thread. While the CLR provides the ThreadStatic attribute, it can only be applied to static variables; some usage patterns in esper (such as statement-specific thread-specific processing data) require that data be associated by instance and thread. The CLR provides a solution to this known as LocalDataStoreSlot. It has been documented that this method is slower than its ThreadStatic counterpart, but it allows for instance-based allocation.

Namespace:  com.espertech.esper.compat.threading.threadlocal
Assembly:  NEsper.Compat (in NEsper.Compat.dll) Version: 8.0.0.0
Syntax
C#
public interface IThreadLocal<T> : IDisposable

Type Parameters

T

[Missing <typeparam name="T"/> documentation for "T:com.espertech.esper.compat.threading.threadlocal.IThreadLocal`1"]

The IThreadLocalT type exposes the following members.

Properties
  NameDescription
Public propertyValue
Gets or sets the value.
Top
Methods
  NameDescription
Public methodGetOrCreate
Gets the data or creates it if not found.
Public methodRemove
Resets the thread local instance.
Top
See Also