Commit 5a95530
committed
feat: add DelayQueueDemo showcasing delayed task execution with DelayQueue
Implemented DelayQueueDemo.java to demonstrate scheduling tasks using DelayQueue,
a thread-safe unbounded blocking queue. Illustrates how elements become available
only after their delay expires via DelayedTask implementation using getDelay() and
compareTo() for time-based ordering.
Signed-off-by: https://github.com/Someshdiwan <[email protected]>1 parent 43bbbb6 commit 5a95530
File tree
1 file changed
+2
-2
lines changed- Section 25 Collections Frameworks/Queue Interface/Delay Queue/src
1 file changed
+2
-2
lines changedLines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
22 | 23 | | |
23 | 24 | | |
24 | 25 | | |
25 | | - | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
0 commit comments