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

java.lang.ref.ReferenceQueue: Add a non-interruptable poll method

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • None
    • 1.2.0
    • core-libs
    • None
    • generic
    • generic

      Date: Mon, 10 Nov 1997 13:44:53 -0500
      From: ###@###.### (Peter Jones - JavaSoft East)

      I know that it's rather late for comments, but I hadn't tried using
      ReferenceQueues in other than a blocking-thread-for-queue situation
      until now... The API would be a bit more convenient if there was a
      separate method to poll the queue instead of having to invoke
      queue.remove(ReferenceQueue.POLL), because the requirement to catch
      InterruptedException doesn't really make sense in the poll situation.
      It can't happen (right?), so the caller just needs to have a dummy
      catch block whenever a poll is required. A separate method would also
      be a bit cleaner than using a magic value, but it was unnecessary
      requirement for exception catching that compelled me to bring this up.

            mr Mark Reinhold
            mr Mark Reinhold
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: