AWSSDK.Tests.TestDriver.EnsureBackgroundExecution C# (CSharp) Method

EnsureBackgroundExecution() private method

private EnsureBackgroundExecution ( System.Action action ) : void
action System.Action
return void
        private void EnsureBackgroundExecution(Action action)
        {
            if (UnityInitializer.IsMainThread())
            {
                ThreadPool.QueueUserWorkItem(new WaitCallback(delegate
                {
                    action.Invoke();
                }));
            }
            else
            {
                action.Invoke();
            }
        }