Hi Julien, On Wed, Jan 03, 2024 at 02:01:51PM +0100, Julien Nabet <serval2412@xxxxxxxx> wrote: > I noticed several methods about async: > > 1) from include/vcl/abstdlg.hxx: > > StartExecuteAsync I think this is the usual codepath for modal dialogs. Some uno command decides to open a dialog, we call StartExecuteAsync() with a callback to handle the dialog result and that handler will be executed at some stage in the future, instead of right now. > 2) from include/svtools/genericasyncunodialog.hxx > > executedAsyncDialog which seems used only for PDF dialog > > createAsyncDialog used for PDF dialog but above all in startExecuteModal > > startExecuteModal > > runAsync > > (perhaps I forgot some). > > Is there some plan to unify them (or at least reduce the number of them) or > each one has its useful role? This looks like a special case for the situation when an import or export action wants to show a dialog, as part of a synchronous filter() API call. In this case you can't move the "rest of the code" to an async callback, so that needs special handling. Luckily these dialogs are rather rare. I fear there is not much you can unify here. Perhaps it's useful to document which one is the usual case and which one is some special minority? Regards, Miklos