completed long running app in thread