コード例 #1
0
ファイル: PooledTaskRunner.cs プロジェクト: USC-ICT/elsender
        public void Run(Object o)
        {
            PooledTaskRunner p = o as PooledTaskRunner;

            p.runningThread = System.Threading.Thread.CurrentThread;
            try
            {
                p.RunTask();
            }
            finally
            {
                p.runningThread = null;
            }
        }
コード例 #2
0
        public void Run(Object o)
        {
            PooledTaskRunner p = o as PooledTaskRunner;

            try
            {
                p.runningThread = System.Threading.Thread.CurrentThread;
                p.workExecutionContextCurrentlyProcessing.Value = true;
                p.RunTask();
            }
            finally
            {
                p.workExecutionContextCurrentlyProcessing.Value = false;
                p.runningThread = null;
            }
        }