![]() | com.espertech.esper.compat.threading.threadlocal Namespace |
[Missing <summary> documentation for "N:com.espertech.esper.compat.threading.threadlocal"]
Class | Description | |
---|---|---|
![]() | DefaultThreadLocalManager | |
![]() | FastThreadLocalT |
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.
During recent testing it was determined that the LocalDataStoreSlot was
using an amount of time that seemed a bit excessive. We took some
snapshots of performance under the profiler. Using that information we
retooled the class to provide tight and fast access to thread-local
instance-specific data. The class is pretty tightly wound and takes a
few liberties in understanding how esper uses it. A ThreadStatic
variable is initialized for the IThreadLocal. This item is 'thread-local'
and contains an array of 'instance-specific' data. Indexing is done
when the IThreadLocal item is created. Under esper this results in roughly
one 'index' per statement. Changes to this model resulted in good cost
savings in the retrieval and acquisition of local data.
|
![]() | FastThreadLocalFactory |
Creates fast thread local objects.
|
![]() | FastThreadStoreT |
FastThreadStore is a variation of the FastThreadLocal, but it lacks a factory
for object creation. While there are plenty of cases where this makes sense,
we actually did this to work around an issue in .NET 3.5 SP1.
|
![]() | SlimThreadLocalT | |
![]() | SlimThreadLocalFactory |
Creates slim thread local objects.
|
![]() | SystemThreadLocalT |
IThreadLocal implementation that uses the native support
in the CLR (i.e. the LocalDataStoreSlot).
|
![]() | SystemThreadLocalFactory |
Creates system thread local objects.
|
![]() | XFastThreadLocalT | |
![]() | XFastThreadLocalFactory |
Creates slim thread local objects.
|
Interface | Description | |
---|---|---|
![]() | IThreadLocalT |
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.
|
![]() | IThreadLocalFactory |
Creator and manufacturer of thread local objects.
|
![]() | IThreadLocalManager |