Skip to main content

Singletons, Critical Sections, and Reader/Writer Locks

  • Chapter
Taming Java Threads
  • 246 Accesses

Abstract

This chapter adds a few more tools to your mutithreading arsenal: I’ll discuss Singletons (one-of-a kind objects) and critical sections (blocks of code that can be executed by only one thread at a time). Singletons in particular, are surprisingly difficult to implement efficiently in a multithreaded environment, but are essential in most programs (java.awt.Toolkit is an example of a Singleton).

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

Access this chapter

eBook
USD 24.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 34.95
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

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2000 Allen I. Holub

About this chapter

Cite this chapter

Holub, A. (2000). Singletons, Critical Sections, and Reader/Writer Locks. In: Taming Java Threads. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4302-1129-7_7

Download citation

  • DOI: https://doi.org/10.1007/978-1-4302-1129-7_7

  • Publisher Name: Apress, Berkeley, CA

  • Print ISBN: 978-1-893115-10-1

  • Online ISBN: 978-1-4302-1129-7

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics