AllocateDataSlot() public static method

public static AllocateDataSlot ( ) : System.LocalDataStoreSlot
return System.LocalDataStoreSlot
Exemplo n.º 1
0
        public ThreadLocal(Func <T> initializer)
        {
            if (initializer == null)
            {
                throw new ArgumentNullException("initializer");
            }

            localStore       = Thread.AllocateDataSlot();
            this.initializer = initializer;
        }
Exemplo n.º 2
0
        public ThreadLocal(Func <T> valueFactory)
        {
            if (valueFactory == null)
            {
                throw new ArgumentNullException("valueFactory");
            }

            localStore        = Thread.AllocateDataSlot();
            this.valueFactory = valueFactory;
        }
Exemplo n.º 3
0
        private ThreadLocal(Func <T> valueFactory, bool initCachedException)
        {
            if (initCachedException)
            {
                cachedException = new ThreadLocal <Exception>(ThreadLocal <Exception> .InitDefault, false);
            }

            if (valueFactory == null)
            {
                throw new ArgumentNullException("valueFactory");
            }

            localStore        = Thread.AllocateDataSlot();
            this.valueFactory = valueFactory;
        }
Exemplo n.º 4
0
 public TLSHolder()
 {
     this.m_slot = Thread.AllocateDataSlot();
 }