java - Wait for a thread to finish before continuing the current thread? -


so have in method:

runnable task = new postloadrunnable(tool, archive); swingutilities.invokelater(task); 

but want make current method not continue until task thread has completed. want join() can't work out how it. task.join() , thread.task.join() doesn't work , thread.currentthread().join() doesn't give me options join thread want.

how stop method until task finished?

you don't want @ all. state in comments code runs in event dispatcher thread. must not block thread. otherwise freeze entire ui , user unhappy.

what probably should disable relevant parts of ui until task has completed. without knowing actual wider requirement isn't possible sure.


Comments

Popular posts from this blog

apache - PHP Soap issue while content length is larger -

asynchronous - Python asyncio task got bad yield -

javascript - Complete OpenIDConnect auth when requesting via Ajax -