Пример #1
0
 private void init(shared_strand strand)
 {
     _strand    = strand;
     _waitQueue = new LinkedList <wait_node>();
     _lockID    = 0;
     _recCount  = 0;
 }
Пример #2
0
        static public void last_tick(Action action)
        {
            shared_strand currStrand = running_strand();

            Debug.Assert(null != currStrand, "不正确的 last_tick 调用!");
            currStrand._readyQueue.AddLast(action);
        }
Пример #3
0
 public go_mutex(shared_strand strand)
 {
     _strand    = strand;
     _waitQueue = new LinkedList <wait_node>();
     _lockID    = 0;
     _recCount  = 0;
     _mustTick  = false;
 }
Пример #4
0
 public async_timer(shared_strand strand, bool utcMode = false)
 {
     _strand     = strand;
     _timerCount = 0;
     _beginTick  = 0;
     _isInterval = false;
     _onTopCall  = false;
     _utcMode    = utcMode;
 }
Пример #5
0
 public steady_timer(shared_strand strand, bool utcMode)
 {
     _utcMode    = utcMode;
     _timerCount = 0;
     _looping    = false;
     _expireTime = long.MaxValue;
     _strand     = strand;
     _timerQueue = new Map <long, async_timer>(true);
 }
Пример #6
0
 public async_timer(shared_strand strand)
 {
     _strand      = strand;
     _timer       = null;
     _lastTimeout = 0;
     _timerCount  = 0;
     _beginTick   = 0;
     _isInterval  = false;
     _onTopCall   = false;
 }
Пример #7
0
 public go_condition_variable(shared_strand strand)
 {
     _strand    = strand;
     _waitQueue = new LinkedList <tuple <long, go_mutex, Action> >();
     _mustTick  = false;
 }
Пример #8
0
 public go_shared_mutex(shared_strand strand) : base(strand)
 {
     _waitQueue = new LinkedList <wait_node>();
     _sharedMap = new Dictionary <long, shared_count>();
 }
Пример #9
0
 private void init(shared_strand strand)
 {
     _strand    = strand;
     _waitQueue = new LinkedList <functional.func>();
 }
Пример #10
0
        public condition_variable()
        {
            shared_strand strand = generator.self_strand();

            init(null != strand ? strand : new shared_strand());
        }
Пример #11
0
 public condition_variable(shared_strand strand)
 {
     _strand    = strand;
     _waitQueue = new LinkedList <functional.func>();
 }
Пример #12
0
        public mutex()
        {
            shared_strand strand = generator.self_strand();

            init(null != strand ? strand : new shared_strand());
        }
Пример #13
0
 public mutex(shared_strand strand)
 {
     init(strand);
 }
Пример #14
0
 private void init(shared_strand strand)
 {
     _upgradeMutex = new mutex(strand);
     _waitQueue    = new LinkedList <wait_node>();
     _sharedMap    = new SortedList <long, shared_count>();
 }