- make sure to cancel the thread after presentation conversion

This commit is contained in:
Richard Alam 2014-09-15 09:05:03 -07:00
parent e313379355
commit 50352c0204

View File

@ -78,10 +78,15 @@ class PresentationService {
}
def processUploadedPresentation = {uploadedPres ->
// Run conversion on another thread.
new Timer(uploadedPres.getName(), false).runAfter(1000)
{
documentConversionService.processDocument(uploadedPres)
// Run conversion on another thread.
Timer t = new Timer(uploadedPres.getName(), false)
t.runAfter(1000) {
try {
documentConversionService.processDocument(uploadedPres)
} finally {
t.cancel()
}
}
}