On 11/05/2011 04:19 AM, Tommaso Cucinotta wrote:
> Il 05/11/2011 08:12, Vincent van Ravesteijn ha scritto:
>> My feeling says we should acquire all information about which files
>> we need to convert. Then we convert them one by one (or make it
>> parallel) and then after each processed file, we should check whether
>> the thread has been cancelled by the UI or not. If not, we continue.
>> This would also allow us to return progress information to the UI.
>
> I know you're discussing about aborting threads, however this may be
> related...
>
> In my old patch for aborting a long Find Advanced operation in
> response to the user pressing [ESC], I had added a couple of methods
> to Application.h and GuiApplication.{h,cpp}, as in the attached patch
> (updated to trunk).
>
> I was thinking to recover this functionality for some upcoming release
> (2.0.x or 2.1.0svn), so I'd like to check whether the GUI interaction
> model might be (made) compatible with the one of cancelling a
> background export or not.
>
> AFAIU, the background export goes on in the background, while the user
> may still work with LyX and modify things, right ? (btw, what happens
> if the user modifies and saves while it is exporting in the background ?)
>
Yes, you can keep working. The trick here is that the export happens on
a clone of the Buffer (indeed, of the whole set of Buffers we're using),
so if you make changes it won't affect the current export.

I think I could make this work if I could figure out a way to send a
signal from the main thread to the background thread....

Richard

Reply via email to