ningshuxia
2023-02-06 1fc0b4ed96d4c4b1ff7142926239998de32b2ada
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
using System.Threading;
 
namespace IStation
{
    internal class SetOperation
    {
        /// <summary>
        /// Locker for this cache key Set function
        /// </summary>
        internal object Lock { get; } = new object();
 
        /// <summary>
        /// Locker for increment / decrement of counter value
        /// </summary>
        internal object CounterLock { get; } = new object();
 
        /// <summary>
        /// Used to count the number of threads being blocked whilst the last thread is being cancelled
        /// </summary>
        internal int Counter { get; set; }
 
        /// <summary>
        /// A thread running a function to Set a cache item
        /// </summary>
        internal Thread Thread { get; set; }
    }
}