private void TestActionExecute(int timeout, ConcurrentExecutor concurrentExecutor, TaskCompletionSource <DateTime> taskCompletionSource)
 {
     concurrentExecutor.Execute(timeout, () =>
     {
         Thread.Sleep(timeout);
         taskCompletionSource.SetResult(DateTime.Now);
     });
 }
        private void TestFuncExecute(int timeout, ConcurrentExecutor concurrentExecutor, TaskCompletionSource <DateTime> taskCompletionSource)
        {
            var dt = concurrentExecutor.Execute(timeout, () =>
            {
                Thread.Sleep(timeout);
                return(DateTime.Now);
            });

            taskCompletionSource.SetResult(dt);
        }