1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-03 22:35:43 +02:00

Bug 365966: Convenience RequestMonitor classes using ImmediateExecutor

This commit is contained in:
William R. Swanson 2011-12-12 05:47:25 -05:00 committed by Marc Khouzam
parent cb5ea6b704
commit 1291c98447
3 changed files with 102 additions and 0 deletions

View file

@ -0,0 +1,34 @@
/*******************************************************************************
* Copyright (c) 2011 Tilera Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* William R. Swanson (Tilera) - initial API and implementation (Bug 365966)
*******************************************************************************/
package org.eclipse.cdt.dsf.concurrent;
/**
* Convenience extension of CountingRequestMonitor that uses the ImmediateExecutor.
* The handleCompleted() method is immediately executed in same thread as done() call.
* @since 2.3
*/
public class ImmediateCountingRequestMonitor extends CountingRequestMonitor
{
/**
* Constructor without a parent monitor and using ImmediateExecutor.
*/
public ImmediateCountingRequestMonitor() {
super(ImmediateExecutor.getInstance(), null);
}
/**
* Constructor with an optional parent monitor and using ImmediateExecutor.
*/
public ImmediateCountingRequestMonitor(RequestMonitor parentMonitor) {
super(ImmediateExecutor.getInstance(), parentMonitor);
}
}

View file

@ -0,0 +1,34 @@
/*******************************************************************************
* Copyright (c) 2011 Tilera Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* William R. Swanson (Tilera) - initial API and implementation (Bug 365966)
*******************************************************************************/
package org.eclipse.cdt.dsf.concurrent;
/**
* Convenience extension of DataRequestMonitor that uses the ImmediateExecutor.
* The handleCompleted() method is immediately executed in same thread as done() call.
* @since 2.3
*/
public class ImmediateDataRequestMonitor<V> extends DataRequestMonitor<V>
{
/**
* Constructor without a parent monitor and using ImmediateExecutor.
*/
public ImmediateDataRequestMonitor() {
super(ImmediateExecutor.getInstance(), null);
}
/**
* Constructor with an optional parent monitor and using ImmediateExecutor.
*/
public ImmediateDataRequestMonitor(RequestMonitor parentMonitor) {
super(ImmediateExecutor.getInstance(), parentMonitor);
}
}

View file

@ -0,0 +1,34 @@
/*******************************************************************************
* Copyright (c) 2011 Tilera Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* William R. Swanson (Tilera) - initial API and implementation (Bug 365966)
*******************************************************************************/
package org.eclipse.cdt.dsf.concurrent;
/**
* Convenience extension of RequestMonitor that uses the ImmediateExecutor.
* The handleCompleted() method is immediately executed in same thread as done() call.
* @since 2.3
*/
public class ImmediateRequestMonitor extends RequestMonitor
{
/**
* Constructor without a parent monitor and using ImmediateExecutor.
*/
public ImmediateRequestMonitor() {
super(ImmediateExecutor.getInstance(), null);
}
/**
* Constructor with an optional parent monitor and using ImmediateExecutor.
*/
public ImmediateRequestMonitor(RequestMonitor parentMonitor) {
super(ImmediateExecutor.getInstance(), parentMonitor);
}
}