How to Cancel a Task

Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, 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.


Exception Handling Task Parallelism Cancellation Technique Task Cancellation Cancellation Mechanism 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Albahari, J., Albahari, B.: C# 3.0 in a Nutshell: A Desktop Quick Reference. O’Reilly Media, Incorporated (2007)Google Scholar
  2. 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. 3.
  4. 4.
    Dean, J., Ghemawat, S.: MapReduce: simplified data processing on large clusters. Communications of the ACM 51(1), 107–113 (2008)CrossRefGoogle Scholar
  5. 5.
  6. 6.
    Hyde, P.: Java thread programming. Sams Pub. (1999)Google Scholar
  7. 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. 8.
    Meyer, B.: Object-Oriented Software Construction, 2nd edn. Prentice-Hall (1997)Google Scholar
  9. 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. 10.
    Nienaltowski, P.: Practical framework for contract-based concurrent object-oriented programming. Ph.D. thesis, ETH Zurich (2007)Google Scholar
  11. 11.
    Peierls, T., Goetz, B., Bloch, J., Bowbeer, J., Lea, D., Holmes, D.: Java Concurrency in Practice. Addison-Wesley (2005)Google Scholar
  12. 12.
    POSIX threads specification (2013),
  13. 13.
  14. 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)CrossRefGoogle Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2013

Authors and Affiliations

  1. 1.ETH ZurichSwitzerland

Personalised recommendations