diff --git a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/ImmediateCountingRequestMonitor.java b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/ImmediateCountingRequestMonitor.java new file mode 100644 index 00000000000..8d62b463852 --- /dev/null +++ b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/ImmediateCountingRequestMonitor.java @@ -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); + } +} diff --git a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/ImmediateDataRequestMonitor.java b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/ImmediateDataRequestMonitor.java new file mode 100644 index 00000000000..4c28b6516d6 --- /dev/null +++ b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/ImmediateDataRequestMonitor.java @@ -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 extends DataRequestMonitor +{ + /** + * 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); + } +} diff --git a/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/ImmediateRequestMonitor.java b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/ImmediateRequestMonitor.java new file mode 100644 index 00000000000..22370e0339e --- /dev/null +++ b/dsf/org.eclipse.cdt.dsf/src/org/eclipse/cdt/dsf/concurrent/ImmediateRequestMonitor.java @@ -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); + } +} \ No newline at end of file