Example #1
0
        public void Unregister(IKcpRunnable runnable)
        {
            Logger.Error("     Unregister   ");
            if (thread == null)
            {
                throw new ArgumentNullException(nameof(runnable));
            }

            this.runnables.Remove(runnable);
        }
Example #2
0
        public void Register(IKcpRunnable runnable)
        {
            if (this.isStop)
            {
                throw new Exception("");
            }
            if (runnable == null)
            {
                throw new ArgumentNullException(nameof(runnable));
            }

            this.runnables.Add(runnable);
        }