Previously, LinkedTransferQueue's methods offer(E) and put(E) had separate implementations, but with the same code:
xfer(e, true, ASYNC, 0L);
Thus, when we overrode offer(E) to invoke tryTranser(e), the put(E) method was unaffected. And the special implementation of MatsFuturizer's ThreadPoolExecutor's RejectedExecutionHandler used the put(E) method to enqueue the task "anyway".
However, with Java 21.0.2, the put(E) method was reimplemented to just call offer(E)! This was pretty bad news for the MatsFuturizer implementation: If more than maximumPoolSize tasks were enqueued, the latter ones would just be thrown out.
Fix this to make a new sneak(E) method that invokes super.offer(E) instead.
Previously, LinkedTransferQueue's methods
offer(E)
andput(E)
had separate implementations, but with the same code:xfer(e, true, ASYNC, 0L);
Thus, when we overrode
offer(E)
to invoketryTranser(e)
, theput(E)
method was unaffected. And the special implementation of MatsFuturizer's ThreadPoolExecutor's RejectedExecutionHandler used theput(E)
method to enqueue the task "anyway".However, with Java 21.0.2, the
put(E)
method was reimplemented to just calloffer(E)
! This was pretty bad news for the MatsFuturizer implementation: If more thanmaximumPoolSize
tasks were enqueued, the latter ones would just be thrown out.Fix this to make a new
sneak(E)
method that invokessuper.offer(E)
instead.