Example #1
0
        public IWaitable <TResult> ScheduleWork <TResult>(Func <TResult> function)
        {
            CheckDisposed();

            var work = new ThreadPoolWork <TResult>(function);

            _worksQueue.Enqueue(work);
            return(work);
        }
Example #2
0
        public IWaitable ScheduleWork(Action action)
        {
            CheckDisposed();

            var work = new ThreadPoolWork(action);

            _worksQueue.Enqueue(work);
            return(work);
        }