--- projects/cms/source/util/uk/org/iscream/cms/util/Queue.java 2001/01/19 01:11:55 1.5 +++ projects/cms/source/util/uk/org/iscream/cms/util/Queue.java 2001/01/23 18:22:28 1.6 @@ -13,7 +13,7 @@ import uk.ac.ukc.iscream.util.*; * actually contains some elements. * * @author $Author: tdb $ - * @version $Id: Queue.java,v 1.5 2001/01/19 01:11:55 tdb Exp $ + * @version $Id: Queue.java,v 1.6 2001/01/23 18:22:28 tdb Exp $ */ public class Queue { @@ -22,7 +22,7 @@ public class Queue { /** * The current CVS revision of this class */ - public static final String REVISION = "$Revision: 1.5 $"; + public static final String REVISION = "$Revision: 1.6 $"; //---STATIC METHODS--- @@ -88,7 +88,21 @@ public class Queue { } return o; } - + + /** + * This method releases a get() method that's currently + * waiting on an empty queue. This was designed for + * shutdown() type methods that may have problems closing + * if the thread of control is waiting on a queue. + * + * @param queue the queue to release + */ + public void releaseQueue(int queue) { + synchronized(((LinkedList) _lists.get(queue))) { + ((LinkedList) _lists.get(queue)).notifyAll(); + } + } + /** * This method returns a textual status of the queues. It * is merely for observation, and would most likely be used