Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Edited by NavBot (vkp)

...

CON37-J. Ensure that tasks executing in a thread pool do not fail silently

CON38-J. Synchronize Do not synchronize on a class literal instead of the return value of the class object returned by getClass()

Introduction

Wiki Markup
Memory that can be shared between threads is called _shared memory_ or _heap memory_. The term _variable_ as used in this section refers to both fields and array elements \[[JLS 05|AA. Java References#JLS 05]\]. Variables that are shared between threads are referred to as shared variables. All instance fields, {{static}} fields, and array elements are shared variables and are stored in heap memory. Local variables, formal method parameters, or exception handler parameters are never shared between threads and are not affected by the [memory model|BB. Definitions#memory model].

...