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 essentially don't think its worth it, if a user is saving on a slow or
flakey filesystem, or is saving a huuuuge file then they have to accept
that it will be slow, in return for the safety guarantee synchronous saving
gives.


> Best regards
>
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/geany/geany/issues/828#issuecomment-166740695>.
>


---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/828#issuecomment-166756765

Reply via email to