Skip to main content

Part of the book series: Lecture Notes in Computer Science ((LNPSE,volume 8063))


Task parallelism is ubiquitous in modern applications for event-based, distributed, or reactive systems. In this type of programming, the ability to cancel a running task arises as a critical feature. Although there are a variety of cancellation techniques, a comprehensive account of their characteristics is missing. This paper provides a classification of task cancellation patterns, as well as a detailed analysis of their advantages and disadvantages. One promising approach is cooperative cancellation, where threads must be continuously prepared for external cancellation requests. Based on this pattern, we propose an extension of SCOOP, an object-oriented concurrency model.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 49.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Similar content being viewed by others


  1. Albahari, J., Albahari, B.: C# 3.0 in a Nutshell: A Desktop Quick Reference. O’Reilly Media, Incorporated (2007)

    Google Scholar 

  2. Baker Jr, H.C., Hewitt, C.: The incremental garbage collection of processes. In: Artificial Intelligence and Programming Languages, pp. 55–59. ACM (1977)

    Google Scholar 

  3. Concurrent futures in Python (2013),

  4. Dean, J., Ghemawat, S.: MapReduce: simplified data processing on large clusters. Communications of the ACM 51(1), 107–113 (2008)

    Article  Google Scholar 

  5. Destroying Threads in C# (2013),

  6. Hyde, P.: Java thread programming. Sams Pub. (1999)

    Google Scholar 

  7. Leijen, D., Schulte, W., Burckhardt, S.: The design of a task parallel library. In: OOPSLA 2009, pp. 227–242. ACM (2009)

    Google Scholar 

  8. Meyer, B.: Object-Oriented Software Construction, 2nd edn. Prentice-Hall (1997)

    Google Scholar 

  9. Morandi, B., Nanz, S., Meyer, B.: Who is accountable for asynchronous exceptions? In: APSEC 2012, pp. 462–471. IEEE Computer Society (2012)

    Google Scholar 

  10. Nienaltowski, P.: Practical framework for contract-based concurrent object-oriented programming. Ph.D. thesis, ETH Zurich (2007)

    Google Scholar 

  11. Peierls, T., Goetz, B., Bloch, J., Bowbeer, J., Lea, D., Holmes, D.: Java Concurrency in Practice. Addison-Wesley (2005)

    Google Scholar 

  12. POSIX threads specification (2013),

  13. Scala Scheduler (2013),

  14. Tahan, O., Brorsson, M., Shawky, M.: Introducing task cancellation to openMP. In: Chapman, B.M., Massaioli, F., Müller, M.S., Rorro, M. (eds.) IWOMP 2012. LNCS, vol. 7312, pp. 73–87. Springer, Heidelberg (2012)

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations


Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2013 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Kolesnichenko, A., Nanz, S., Meyer, B. (2013). How to Cancel a Task. In: Lourenço, J.M., Farchi, E. (eds) Multicore Software Engineering, Performance, and Tools. MUSEPAT 2013. Lecture Notes in Computer Science, vol 8063. Springer, Berlin, Heidelberg.

Download citation

  • DOI:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-642-39954-1

  • Online ISBN: 978-3-642-39955-8

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics