Am 22.12.2015 um 23:58 schrieb elextr: > On 23 December 2015 at 07:54, Thomas Martitz <[email protected]> > wrote: > > > Am 22.12.2015 um 22:41 schrieb elextr: > > > > > > Once we had the buffer copy we could spawn the plain file write or > > > |g_file_set_contents| methods as separate threads. > > > > > > > > > > We have that, haven't we? > > > > I was suggested a poll() so that we don't introduce threads into geany, > > however for this specific use case a fire-and-forget worker thread might > > be easier to deal with. > > > > Nah, we need the result back. But g_task can call a callback when the job > finishes. > > More complex is how to handle user actions that involve the file before > svaing is finished. Examples are reload, another save, build. This is > really the place where incomplete asynchronous saving can cause problems, > and its fairly complex to handle.
I didnt suggest an asynchronous saving. Just one where the main thread can keeps responsive instead of freeze (and perhaps offer cancellation of the saving if it takes too long). I agree that most, if not all, user interaction should be blocked during save, but that doesn't mean the UI has to freeze up. Best regards. --- Reply to this email directly or view it on GitHub: https://github.com/geany/geany/issues/828#issuecomment-166766696
