[
https://issues.redhat.com/browse/JGRP-2492?page=com.atlassian.jira.plugin...
]
Bela Ban commented on JGRP-2492:
--------------------------------
The immediate solution is to remove {{removeCancelledTasks()}}; this is not as bad as it
sounds, because:
* Tasks are continually removed from the head of the queue. If a task was cancelled, it
will simply not get executed (but still removed)
* There are typically 7-9 tasks in the queue, so this is not a big issue
* On {{stop()}}, all tasks are cancelled and removed. Using {{toArray()}} here for
iteration is not critical, as this is called before the program terminated anyway.
TimeScheduler3.add() gets more expensive as the queue size grows
----------------------------------------------------------------
Key: JGRP-2492
URL:
https://issues.redhat.com/browse/JGRP-2492
Project: JGroups
Issue Type: Bug
Affects Versions: 4.2.4
Reporter: Dan Berindei
Assignee: Bela Ban
Priority: Minor
Fix For: 5.0.0.Final
{{TimeScheduler3.add()}} calls {{removeCancelledTasks()}}, which ends up calling
{{DelayQueue.toArray()}} (because {{DelayQueue}} doesn't support directly iterating
over its contents).
--
This message was sent by Atlassian Jira
(v7.13.8#713008)