This is a followup for my previous question enter link description here
Now the problem is that I can't "block" (Future.get) in my main thread because it must continue with its work, but I do need the threads to signal it some how...
Why not just call Future.isDone()
periodically from your main thread, and if done, Future.get()
the result ? That will throw the original exception.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.