public void Stop(AsyncProcessHandle handle)
        {
            var coroutine = _runningCoroutines[handle.Id];

            StopCoroutine(coroutine);
            _runningCoroutines.Remove(handle.Id);
        }
        /// <summary>
        ///     コルーチンを開始します。
        /// </summary>
        /// <param name="routine"></param>
        /// <returns></returns>
        public AsyncProcessHandle Run(IEnumerator routine)
        {
            if (routine == null)
            {
                throw new ArgumentNullException(nameof(routine));
            }

            var id           = _currentId++;
            var handle       = new AsyncProcessHandle(id);
            var handleSetter = (IAsyncProcessHandleSetter)handle;

            void OnComplete(object result)
            {
                handleSetter.Complete(result);
            }

            void OnError(Exception ex)
            {
                handleSetter.Error(ex);
            }

            void OnTerminate()
            {
                _runningCoroutines.Remove(id);
            }

            var coroutine = StartCoroutineInternal(routine, ThrowException, OnComplete,
                                                   OnError, OnTerminate);

            _runningCoroutines.Add(id, coroutine);
            return(handle);
        }