1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-03 23:25:26 +02:00

Throw RemoteFileCanceledException in case IFileService operations were canceled

This commit is contained in:
Martin Oberhuber 2007-07-27 17:26:10 +00:00
parent 027ca1461a
commit a34964063b
2 changed files with 12 additions and 1 deletions

View file

@ -336,6 +336,8 @@ public class SftpFileService extends AbstractFileService implements IFileService
} finally {
fDirChannelMutex.release();
}
} else {
throw new RemoteFileCancelledException();
}
return (IHostFile[])results.toArray(new IHostFile[results.size()]);
}
@ -607,6 +609,8 @@ public class SftpFileService extends AbstractFileService implements IFileService
} finally {
fDirChannelMutex.release();
}
} else {
throw new RemoteFileCancelledException();
}
return result;
}
@ -627,6 +631,8 @@ public class SftpFileService extends AbstractFileService implements IFileService
} finally {
fDirChannelMutex.release();
}
} else {
throw new RemoteFileCancelledException();
}
return result;
}
@ -945,7 +951,9 @@ public class SftpFileService extends AbstractFileService implements IFileService
Activator.trace("SftpFileService.getOutputStream " + remoteFile + " failed: " + e.toString()); //$NON-NLS-1$ //$NON-NLS-2$
throw makeSystemMessageException(e);
}
if (monitor.isCanceled()) {
throw new RemoteFileCancelledException();
}
return stream;
}
}

View file

@ -69,6 +69,9 @@ public class Mutex {
if (Thread.interrupted()) {
return false;
}
if (monitor!=null && monitor.isCanceled()) {
return false;
}
final Thread myself = Thread.currentThread();
synchronized(fWaitQueue) {
if (!fLocked) {