[concurrency-interest] When do you use wait/notify?

Doug Lea dl@cs.oswego.edu
Sat, 24 Jan 2004 10:33:07 -0500

Ernst's mail prompted me to also send this, which I've been meaning to
do for a while:

We'd like to know, given what is in JSR166, what kinds of cases might
still arise where application writers will use error-prone code
involving especially wait/notify rather than higher-level
constructions. If you know of some, could you tell us?  It is very
unlikely that we will be able to immediately do anything constructive
with this information, but it would still be useful to know what kinds
of cases still exist. (As in my last mail, atomics, park/unpark, and
other lower-level features in the subpackages exist for the sake of
infrastructure developers who we expect to write customized
synchronization code, but this is a very different audience.)

As discussed a few times previously, the main area we know is lacking
is support for lightweight transactions (i.e, non-persistent,
unrelated to databases), for which we feel that there are still too
many different approaches and conflicting requirments to standardize
yet into JDK.