< prev index next >

src/com/sun/javatest/exec/BP_FilteredOutSubpanel.java

Print this page

        

*** 201,211 **** // object, causing a deadlock here. // sync. to hold observer traffic until re-sync is done synchronized (cache) { synchronized(BP_FilteredOutSubpanel.this) { // resync with this node cache ! Vector[] newData = cache.addObserver(cacheWatcher, true); // add tests into the list model - this doesn't make the data // live though for (int j = 0; j < newData[newData.length-1].size() - 1; j++) { if (stopping) --- 201,211 ---- // object, causing a deadlock here. // sync. to hold observer traffic until re-sync is done synchronized (cache) { synchronized(BP_FilteredOutSubpanel.this) { // resync with this node cache ! Vector<TestResult>[] newData = cache.addObserver(cacheWatcher, true); // add tests into the list model - this doesn't make the data // live though for (int j = 0; j < newData[newData.length-1].size() - 1; j++) { if (stopping)
*** 399,409 **** // ---------- Custom methods for this model ---------- /** * @param suppressNotify Actively request that no update be scheduled. */ ! void addTest(Object tr, boolean suppressNotify) { synchronized (vLock) { // make sure this item is not already in the list if (!inQueue.contains(tr)) { inQueue.addElement(tr); } --- 399,409 ---- // ---------- Custom methods for this model ---------- /** * @param suppressNotify Actively request that no update be scheduled. */ ! void addTest(TestResult tr, boolean suppressNotify) { synchronized (vLock) { // make sure this item is not already in the list if (!inQueue.contains(tr)) { inQueue.addElement(tr); }
*** 419,429 **** /** * Remove the given test from the list. * Ignored if the test is not in the list. */ ! void removeTest(Object tr) { synchronized (vLock) { rmQueue.addElement(tr); // try not to saturate the GUI event thread if (!isUpdateScheduled) { --- 419,429 ---- /** * Remove the given test from the list. * Ignored if the test is not in the list. */ ! void removeTest(TestResult tr) { synchronized (vLock) { rmQueue.addElement(tr); // try not to saturate the GUI event thread if (!isUpdateScheduled) {
*** 457,469 **** TableNotifier tn = (TableNotifier)(pendingEvents.get(i)); tn.cancel(); } // for } ! inQueue = new Vector(); ! rmQueue = new Vector(); ! liveData = new LinkedList(); isUpdateScheduled = false; } /** --- 457,469 ---- TableNotifier tn = (TableNotifier)(pendingEvents.get(i)); tn.cancel(); } // for } ! inQueue = new Vector<>(); ! rmQueue = new Vector<>(); ! liveData = new LinkedList<>(); isUpdateScheduled = false; } /**
*** 557,567 **** private void processRemoveQueue() { if (rmQueue.size() == 0) return; while (rmQueue.size() > 0) { ! TestResult target = (TestResult)(rmQueue.remove(0)); int targetIndex = liveData.indexOf(target); if (targetIndex != -1) { synchronized (liveData) { // necessary for proper synchronization // should not be a problem really, based on how other --- 557,567 ---- private void processRemoveQueue() { if (rmQueue.size() == 0) return; while (rmQueue.size() > 0) { ! TestResult target = rmQueue.remove(0); int targetIndex = liveData.indexOf(target); if (targetIndex != -1) { synchronized (liveData) { // necessary for proper synchronization // should not be a problem really, based on how other
*** 658,671 **** private String[] colNames; // must sync. on vLock anytime you access inQueue or liveData private final Object vLock = new Object(); // lock for inQueue & rmQueue ! private Vector inQueue; // queue of items to be added to live data ! private Vector rmQueue; // queue of items to be removed from live data ! private LinkedList liveData; // to allow manual synchronization ! Vector pendingEvents = new Vector(); volatile boolean isUpdateScheduled; // are updates waiting in inQueue or rmQueue private static final int BATCH_SIZE = 100; private static final int COLUMN_COUNT = 2; --- 658,671 ---- private String[] colNames; // must sync. on vLock anytime you access inQueue or liveData private final Object vLock = new Object(); // lock for inQueue & rmQueue ! private Vector<TestResult> inQueue; // queue of items to be added to live data ! private Vector<TestResult> rmQueue; // queue of items to be removed from live data ! private LinkedList<TestResult> liveData; // to allow manual synchronization ! Vector<TableNotifier> pendingEvents = new Vector<>(); volatile boolean isUpdateScheduled; // are updates waiting in inQueue or rmQueue private static final int BATCH_SIZE = 100; private static final int COLUMN_COUNT = 2;
< prev index next >