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

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

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

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