-
Enhancement
-
Resolution: Won't Fix
-
P4
-
None
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
A lot of close and cleanup operations prefer last-in first-out (LIFO). BaseStream.onClose(h) registers handlers so that they are invoked first-in first-out (FIFO). It would be nice if there was a version that let me register things LIFO.
I propose a new method be added that looks like this:
BaseStream.onClose(Runnable h, boolean lifo)
and if lifo is set to true then that handler gets run before all other registered handlers.
A lot of close and cleanup operations prefer last-in first-out (LIFO). BaseStream.onClose(h) registers handlers so that they are invoked first-in first-out (FIFO). It would be nice if there was a version that let me register things LIFO.
I propose a new method be added that looks like this:
BaseStream.onClose(Runnable h, boolean lifo)
and if lifo is set to true then that handler gets run before all other registered handlers.