コード例 #1
0
ファイル: Thread.cs プロジェクト: randomize/VimConfig
 private static void RemoveDomainLocalStore(LocalDataStore dls)
 {
     if (dls != null)
     {
         LocalDataStoreManager.DeleteLocalDataStore(dls);
     }
 }
コード例 #2
0
ファイル: Thread.cs プロジェクト: randomize/VimConfig
        public static void SetData(LocalDataStoreSlot slot, object data)
        {
            LocalDataStore domainLocalStore = GetDomainLocalStore();

            if (domainLocalStore == null)
            {
                domainLocalStore = LocalDataStoreManager.CreateLocalDataStore();
                SetDomainLocalStore(domainLocalStore);
            }
            domainLocalStore.SetData(slot, data);
        }
コード例 #3
0
ファイル: Thread.cs プロジェクト: randomize/VimConfig
        public static object GetData(LocalDataStoreSlot slot)
        {
            LocalDataStoreManager.ValidateSlot(slot);
            LocalDataStore domainLocalStore = GetDomainLocalStore();

            if (domainLocalStore == null)
            {
                return(null);
            }
            return(domainLocalStore.GetData(slot));
        }
コード例 #4
0
        public static void SetData(LocalDataStoreSlot slot, object data)
        {
            LocalDataStoreHolder holder = s_LocalDataStore;

            if (holder == null)
            {
                holder           = LocalDataStoreManager.CreateLocalDataStore();
                s_LocalDataStore = holder;
            }
            holder.Store.SetData(slot, data);
        }
コード例 #5
0
        public static object GetData(LocalDataStoreSlot slot)
        {
            LocalDataStoreHolder holder = s_LocalDataStore;

            if (holder == null)
            {
                LocalDataStoreManager.ValidateSlot(slot);
                return(null);
            }
            return(holder.Store.GetData(slot));
        }
コード例 #6
0
ファイル: Thread.cs プロジェクト: pmhsfelix/coreclr
        /*=========================================================================
        ** Sets the data in the specified slot on the currently running thread, for that thread's current domain.
        ** =========================================================================*/
        public static void SetData(LocalDataStoreSlot slot, Object data)
        {
            LocalDataStoreHolder dls = s_LocalDataStore;

            // Create new DLS if one hasn't been created for this domain for this thread
            if (dls == null)
            {
                dls = LocalDataStoreManager.CreateLocalDataStore();
                s_LocalDataStore = dls;
            }

            dls.Store.SetData(slot, data);
        }
コード例 #7
0
ファイル: Thread.cs プロジェクト: pmhsfelix/coreclr
        /*=========================================================================
        ** Retrieves the value from the specified slot on the current thread, for that thread's current domain.
        ** =========================================================================*/
        public static Object GetData(LocalDataStoreSlot slot)
        {
            LocalDataStoreHolder dls = s_LocalDataStore;

            if (dls == null)
            {
                // Make sure to validate the slot even if we take the quick path
                LocalDataStoreManager.ValidateSlot(slot);
                return(null);
            }

            return(dls.Store.GetData(slot));
        }
コード例 #8
0
ファイル: Thread.cs プロジェクト: pmhsfelix/coreclr
 /*=========================================================================
 ** Frees a named data slot. The slot is allocated on ALL the
 ** threads.  Named data slots are "public" and can be manipulated by
 ** anyone.
 ** =========================================================================*/
 public static void FreeNamedDataSlot(String name)
 {
     LocalDataStoreManager.FreeNamedDataSlot(name);
 }
コード例 #9
0
ファイル: Thread.cs プロジェクト: pmhsfelix/coreclr
 /*=========================================================================
 ** Looks up a named data slot. If the name has not been used, a new slot is
 ** allocated.  Named data slots are "public" and can be manipulated by
 ** anyone.
 ** =========================================================================*/
 public static LocalDataStoreSlot GetNamedDataSlot(String name)
 {
     return(LocalDataStoreManager.GetNamedDataSlot(name));
 }
コード例 #10
0
ファイル: Thread.cs プロジェクト: pmhsfelix/coreclr
 /*=========================================================================
 ** Allocates a named data slot. The slot is allocated on ALL the
 ** threads.  Named data slots are "public" and can be manipulated by
 ** anyone.
 ** =========================================================================*/
 public static LocalDataStoreSlot AllocateNamedDataSlot(String name)
 {
     return(LocalDataStoreManager.AllocateNamedDataSlot(name));
 }
コード例 #11
0
ファイル: Thread.cs プロジェクト: pmhsfelix/coreclr
 /*=========================================================================
 ** Allocates an un-named data slot. The slot is allocated on ALL the
 ** threads.
 ** =========================================================================*/
 public static LocalDataStoreSlot AllocateDataSlot()
 {
     return(LocalDataStoreManager.AllocateDataSlot());
 }