public void Run()
        {
            var createdStateInfoConcurrent = CreatedStateInfo.AsParallelWriter();

            var addOneHandle = new Add()
            {
                StateDataContext = StateManager.GetStateDataContext(),
                UnexpandedStates = UnexpandedStates.AsDeferredJobArray(),
                CreatedStateInfo = createdStateInfoConcurrent,
                ValueToAdd       = 1,
            }.Schedule(UnexpandedStates, UnexpandedStates.Length);

            addOneHandle.Complete();

            var addTwoHandle = new Add()
            {
                StateDataContext = StateManager.GetStateDataContext(),
                UnexpandedStates = UnexpandedStates.AsDeferredJobArray(),
                CreatedStateInfo = createdStateInfoConcurrent,
                ValueToAdd       = 2,
            }.Schedule(UnexpandedStates, UnexpandedStates.Length);

            addTwoHandle.Complete();

            var addThreeHandle = new Add()
            {
                StateDataContext = StateManager.GetStateDataContext(),
                UnexpandedStates = UnexpandedStates.AsDeferredJobArray(),
                CreatedStateInfo = createdStateInfoConcurrent,
                ValueToAdd       = 3,
            }.Schedule(UnexpandedStates, UnexpandedStates.Length);

            addThreeHandle.Complete();
        }
        public JobHandle Schedule(JobHandle inputDeps)
        {
            var createdStateInfoConcurrent = CreatedStateInfo.AsParallelWriter();

            var addOneHandle = new Add()
            {
                StateDataContext = StateManager.GetStateDataContext(),
                UnexpandedStates = UnexpandedStates.AsDeferredJobArray(),
                CreatedStateInfo = createdStateInfoConcurrent,
                ValueToAdd       = 1,
            }.Schedule(UnexpandedStates, 0, inputDeps);

            var addTwoHandle = new Add()
            {
                StateDataContext = StateManager.GetStateDataContext(),
                UnexpandedStates = UnexpandedStates.AsDeferredJobArray(),
                CreatedStateInfo = createdStateInfoConcurrent,
                ValueToAdd       = 2,
            }.Schedule(UnexpandedStates, 0, inputDeps);

            var addThreeHandle = new Add()
            {
                StateDataContext = StateManager.GetStateDataContext(),
                UnexpandedStates = UnexpandedStates.AsDeferredJobArray(),
                CreatedStateInfo = createdStateInfoConcurrent,
                ValueToAdd       = 3,
            }.Schedule(UnexpandedStates, 0, inputDeps);

            return(JobHandle.CombineDependencies(addOneHandle, addTwoHandle, addThreeHandle));
        }