TaskFactory factory = new TaskFactory(lcts) ĬancellationTokenSource cts = new CancellationTokenSource() Create a TaskFactory and pass it our custom scheduler. LimitedConcurrencyLevelTaskScheduler lcts = new LimitedConcurrencyLevelTaskScheduler(2) Create a scheduler that uses two threads. It then launches two sets of tasks and displays information about the task and the thread on which the task is executing. General conceptual information about the Task Scheduler API.Ĭode examples that show how to use the Task Scheduler APIs.ĭetailed reference information for Task Scheduler APIs and the Task Scheduler schema.The following example creates a custom task scheduler that limits the number of threads used by the app. Summary of new functionality introduced by the Task Scheduler. Server requires Windows Server 2008 or Windows Server 2003.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |