示例#1
0
        public static void Subscribe(CallSlot call)
        {
            var bucket = s_Calls[(call.GetHashCode() & CoreConsts.ABS_HASH_MASK) % BUCKETS];

            lock (bucket) bucket.AddLast(call);
            if (s_Thread == null)
            {
                lock (typeof(TimeoutReactor))
                    if (s_Thread == null)
                    {
                        s_Thread = new Thread(threadSpin);
                        s_Thread.IsBackground = true;
                        s_Thread.Name         = typeof(TimeoutReactor).FullName;
                        s_Thread.Start();
                    }
            }
        }
示例#2
0
        public static void Subscribe(CallSlot call)
        {
            var bucket = s_Calls[Math.Abs(call.GetHashCode() % BUCKETS)];

            lock (bucket) bucket.Add(call);
            if (s_Thread == null)
            {
                lock (typeof(TimeoutReactor))
                    if (s_Thread == null)
                    {
                        s_Thread = new Thread(threadSpin);
                        s_Thread.IsBackground = true;
                        s_Thread.Name         = typeof(TimeoutReactor).FullName;
                        s_Thread.Start();
                    }
            }
        }
示例#3
0
 public FutureVoid(CallSlot call)
 {
     Call = call;
 }
示例#4
0
 public Future(CallSlot call)
 {
     Call = call;
 }
示例#5
0
 public void ClientDispatchedRequest(ClientEndPoint client, RequestMsg request, CallSlot callSlot)
 {
 }