On 04/16/2018 06:29 PM, Scott Kostyshak wrote: > On Mon, Apr 16, 2018 at 06:08:26PM +0000, Richard Kimberly Heck wrote: > >> One polishing thing I've considered is to allow this to be done by >> clicking on the spinning wheel thing that pops up during compilation (or >> maybe double clicking), and possibly to bind this to some key. Any thoughts? > I don't have any thought on that, but another polishing feature would be > when the user goes to exit during compilation, they get a dialog with > the message > > "LyX could not be closed because documents are being processed by LyX" > > Perhaps we could add another option to cancel processing and exit.
I just tried to do that. I can add the option, but we need somehow to wait for the background thread to finish before trying to exit. If we try to do that, though, the whole thing locks, because the GUI thread needs to display the message that the process was canceled. If we try sleeping, then we don't show the message either, because we are asleep. What I need is something like: sleep a bit.... see if the processing thread is finished yet... handle usual events... repeat.... Riki