Teaching students to develop thread-safe java classes

  • Authors:
  • Alan D. Fekete

  • Affiliations:
  • University of Sydney, Sydney, Australia

  • Venue:
  • Proceedings of the 13th annual conference on Innovation and technology in computer science education
  • Year:
  • 2008

Quantified Score

Hi-index 0.00

Visualization

Abstract

Concurrent programming was once the preserve of experts writing systems internals; but recently the growing importance of application servers, and the excellent support in Java and C# for thread handling, has brought threads and locking as topics that every software developer might experience, and therefore every computer science graduate ought to know. In this paper we report on several years of experience teaching this material in the early years of the curriculum. We focus on one aspect of multi-threaded code, namely how to write sensible thread-safe classes. We identify the learning outcomes we aim to deliver, and we discuss the main pedagogic difficulties students find. We present some examples that can help students avoid common erroneous views.