On 09/20/11 12:29, Aleksey Shipilev wrote:
Hi,
I've been stumbled upon this for a bit.
Is there any specific reason DelayQueue is not serializable? Or is it
an API bug?
The backing PriorityQueue *is* serializable.
It was a deliberate decision.
DelayQueues use relative times, so the delays don't make sense
when deserialized at an arbitrary time. And there's no way to
guarantee a correct clock resync to re-normalize.
Plus, no one has ever complained about this, so we
haven't ever revisited it.
-Doug