Abstract
You saw in Chapter 6 how, when creating a continuation, you can pass a scheduler on which to execute the task. The example in the chapter used the out-of-the-box SynchronizationContextTaskScheduler to push task execution on to the UI thread. It turns out, however, that there is nothing special about the SynchronizationContextTaskScheduler; the task scheduler is a pluggable component. .NET 4.5 introduced another specialized scheduler, but beyond that you can write task schedulers yourself. This chapter looks at the new scheduler introduced in .NET 4.5 and how to write a custom task scheduler. Writing custom task schedulers can be fairly straightforward, but there are some of the issues that you need to be aware of.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2013 Richard Blewett
About this chapter
Cite this chapter
Blewett, R., Clymer, A. (2013). Task Scheduling. In: Pro Asynchronous Programming with .NET. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-5921-3_12
Download citation
DOI: https://doi.org/10.1007/978-1-4302-5921-3_12
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4302-5920-6
Online ISBN: 978-1-4302-5921-3
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)