[Github-comments] [geany] Geany Freezes when unable to safe an edited file to it's FTP dir, no timeout on atempt saving file (#828)

elextr notifications at xxxxx
Tue Dec 22 22:58:02 UTC 2015


On 23 December 2015 at 07:54, Thomas Martitz <notifications at github.com>
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20151222/572eb0cf/attachment.html>


More information about the Github-comments mailing list