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


<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/geany/geany/issues/828#issuecomment-166766696">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ_1C67CZ0pWXrj5cGyAoqQHNkBHuks5pSd8BgaJpZM4G3UHR.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/issues/828#issuecomment-166766696"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>