Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4912212

(ref) Enhancement to java.lang.Reference to allow detection of being enqueued

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 1.4.1
    • core-libs
    • x86
    • windows_2000



      Name: jl125535 Date: 08/25/2003


      A DESCRIPTION OF THE REQUEST :
      There is not way for an object to tidy itself up after being enqueued. The object is not informed (or rather it is , but just to handle the enqueuing, not the impact)

      The alternatives are to have a thread listen on the queue and handle the Reference when it arrives, or have a timer periodically poll the queue to see if there is anything to handle.

      I did look at 4884236 before I raised this issue, and my reading of it
      was that it was concerned with the fact that it is enqueued after it is
      cleared. But 4884236 is concerned with WHEN the referent is cleared, while
      this RFE deals with MANAGEMENT of the application / enqueueing process.
      These are related, but nothing in 4884236 covers these issues, and there has been no addition the 4884236 (when I checked today) to cover this problem.

      JUSTIFICATION :
      if there are many queues in a system the first alternative has many threads, and the overhead that that entails

      the second alternative involves a background CPU load, and is not very responsive to the queue. Also the cannot be swapped as it keep waking up.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      I protected method on the Reference or ReferenceQueue that is called when the Object is enqueued, or automatically shortly afterwards
      (Incident Review ID: 190321)
      ======================================================================

            mr Mark Reinhold
            jleesunw Jon Lee (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Imported:
              Indexed: