Chapter 17. Threads and Locks

 

And oft-times in the most forbidding denOf solitude, with love of science strong,How patiently the yoke of thought they bear;How subtly glide its finest threads along!

 
 --William Wordsworth, Monks and Schoolmen, in Ecclesiastical Sonnets (1822)

While most of the discussion in the preceding chapters is concerned only with the behavior of code as executed a single statement or expression at a time, that is, by a single thread, each Java virtual machine can support many threads of execution at once. These threads independently execute code that operates on values and objects residing in a shared main memory. Threads may be supported by having many hardware processors, by time-slicing a single hardware processor, or by ...

Get Java™ Language Specification, Third Edition, The now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.