In some cases, a background job needs to ask a question but could still continue the work in the meantime. This could be because the job can continue other tasks that don't depend on the answer, or, as in the case of XWIKI-22323, that the job just asks the user if they want to continue waiting for something where, while the job doesn't actually continue, the job can automatically dismiss the question when the waiting completed. For this, it would be very useful if questions could be asked asynchronously with a non-blocking method. Technically, there is no real reason for the question asking to be blocking. A new API should be added for this that returns a Future that is completed once the question has been answered. |