 | 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
Syntaxpublic 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
| Name | Description |
---|
 | Value |
Gets or sets the value.
|
Top
Methods
| Name | Description |
---|
 | GetOrCreate |
Gets the data or creates it if not found.
|
 | Remove |
Resets the thread local instance.
|
Top
See Also