public IWaitable <TResult> ScheduleWork <TResult>(Func <TResult> function) { CheckDisposed(); var work = new ThreadPoolWork <TResult>(function); _worksQueue.Enqueue(work); return(work); }
public IWaitable ScheduleWork(Action action) { CheckDisposed(); var work = new ThreadPoolWork(action); _worksQueue.Enqueue(work); return(work); }